Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50103

Save as PDF to a folder I choose

$
0
0
Hi, I'm fairly new to vba so I'd appreciate all the help I can get. I'd like my macro to pop up the window that'd ask where I'd like my pdf file (exported from excel) to be saved. How can I do that? I understand that the code below will assign the name for the file and save it to desktop. Please help.

Code:

Sub SavePDF()
Dim MyFullName As String
 
MyFullName = "C:\Users\qlarimer\Desktop\Filename.pdf"
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=MyFullName, _
Quality:=xlQualityMinimum, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True

End Sub


Viewing all articles
Browse latest Browse all 50103

Trending Articles