vba export excel to pdf text sie code example
Example: Excel VBA PDF sheet and save to file path from cell
Sub GetFilePath_Click()
Dim FileAndLocation As Variant
Dim strPathLocation As String
Dim strFilename As String
Dim strPathFile As String
strPathLocation = Worksheets("05282017").Range("D3").Value
strFilename = Worksheets("05282017").Range("D2").Value
strPathFile = strPathLocation & strFilename
FileAndLocation = Application.GetSaveAsFilename _
(InitialFileName:=strPathLocation & strFilename, _
filefilter:="PDF Files (*.pdf), *.pdf", _
Title:="Select Folder and FileName to save")
MsgBox FileAndLocation
End Sub