amandabstewart
New Member
- Joined
- Aug 4, 2014
- Messages
- 45
I've tried numerous times to get a macro to save as PDF in a specific folder location combined with saving that PDF named as a cell's contents using cell J5. Just can't see what I'm doing wrong.
What does work (doesn't include cell J5 naming) is shown below. It saves the PDF as "mega" which is the name of the workbook...tis is the correct file location
Can anyone fix it to do both?
' SavePDF Macro
'
'
Range("A1:D32").Select
ChDir"C:\Users\abarker\Desktop\Orders & Inventory\ordered"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\abarker\Desktop\Orders &Inventory\ordered\MEGA.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False,_
OpenAfterPublish:=True
End Sub
Sub SavePDF()
What does work (doesn't include cell J5 naming) is shown below. It saves the PDF as "mega" which is the name of the workbook...tis is the correct file location
Can anyone fix it to do both?
' SavePDF Macro
'
'
Range("A1:D32").Select
ChDir"C:\Users\abarker\Desktop\Orders & Inventory\ordered"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\abarker\Desktop\Orders &Inventory\ordered\MEGA.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False,_
OpenAfterPublish:=True
End Sub
Sub SavePDF()