Hi,
I'm a novice VBA user so bear with me please.
I need to create a PDF file from the first two sheets of a workbook, and I would like the PDF name to default to the name of the active workbook. Below is what I have so far, but I don't want to hardcode the name "myfile.pdf". Ideally I would like it to open the Save As dialog with the appropriate default name. Any suggestions? Thanks!
Sheets(Array("Page1", "Page2")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\myfile.pdf", Quality _
:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Bookmarks