Jagat Pavasia
Active Member
- Joined
- Mar 9, 2015
- Messages
- 404
- Office Version
- 2021
- Platform
- Windows
dear sir,
I have to save my all sheet to PDF format on my desktop folder location.
I have VBA code below. But file name I want as same as sheet name.
In this sample VBA code the sheet name is "Blank (44)". I want that if my another sheet name is "Blank 34" then it should be save PDF named "Blank 34.pdf".
please help with edit this macro module.
I have to save my all sheet to PDF format on my desktop folder location.
I have VBA code below. But file name I want as same as sheet name.
In this sample VBA code the sheet name is "Blank (44)". I want that if my another sheet name is "Blank 34" then it should be save PDF named "Blank 34.pdf".
please help with edit this macro module.
VBA Code:
Sub AutoPDF()
'
' AutoPDF Macro
'
'
Sheets("Blank (44)").Select
Range("L27").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\Jagat Pavasia\Desktop\Copy to HOME\Blank (44).pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub
Last edited by a moderator: