daves37120
New Member
- Joined
- Apr 8, 2021
- Messages
- 4
- Office Version
- 2010
- Platform
- Windows
Hi folks,
I have been working on a macro to save certain tabs in a workbook as pdf in a folder. So far it will select the tabs and create a pdf file, but for the life of me, I cannot determine how to get it to save to the folder. The pdf is named correctly when exported, but is not saved. Several macro variants have been tried and all are removed from the macro with the hope someone can show me the correct way to add it. The path is on a "Control" tab (all inputs are here). Any help would be greatly appreciated.
Sub SavePDF_2()
Dim Path, FileName1 As String
Path = Sheets("Control").Range("H13")
FileName1 = Sheets("Control").Range("H13")
ThisWorkbook.Sheets(Array("Management Discussion", "Operating Summary", "Subscription ARR", _
"Income Statement", "BS & Cash Flow", "Working Capital", "SG&A & FTE's")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
Path & FileName1 & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
I have been working on a macro to save certain tabs in a workbook as pdf in a folder. So far it will select the tabs and create a pdf file, but for the life of me, I cannot determine how to get it to save to the folder. The pdf is named correctly when exported, but is not saved. Several macro variants have been tried and all are removed from the macro with the hope someone can show me the correct way to add it. The path is on a "Control" tab (all inputs are here). Any help would be greatly appreciated.
Sub SavePDF_2()
Dim Path, FileName1 As String
Path = Sheets("Control").Range("H13")
FileName1 = Sheets("Control").Range("H13")
ThisWorkbook.Sheets(Array("Management Discussion", "Operating Summary", "Subscription ARR", _
"Income Statement", "BS & Cash Flow", "Working Capital", "SG&A & FTE's")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
Path & FileName1 & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub