saloelrn1988
New Member
- Joined
- Apr 14, 2020
- Messages
- 32
- Office Version
- 365
- Platform
- Windows
Hi I need Help!
i am able to save my Pivot table in PDF however upon saving it saves other pages with blanks. i wanted to save it up until the cell containing data(my last cell may vary because I'm using different data per week).
See below coding that i used:
Sub Save_PDF()
'
' Save_PDF Macro
' Save pivot table as PDF
Dim saveLocation As String
saveLocation = "C:\Users\elon\Desktop\" & Sheets("email data").Range("B3")
Sheets("pivot table").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=saveLocation _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
Worksheets("raw data").Select
End Sub
i am able to save my Pivot table in PDF however upon saving it saves other pages with blanks. i wanted to save it up until the cell containing data(my last cell may vary because I'm using different data per week).
See below coding that i used:
Sub Save_PDF()
'
' Save_PDF Macro
' Save pivot table as PDF
Dim saveLocation As String
saveLocation = "C:\Users\elon\Desktop\" & Sheets("email data").Range("B3")
Sheets("pivot table").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=saveLocation _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
Worksheets("raw data").Select
End Sub