The code below functions correctly except for the 13 or so blank pages that are added in addition to my worksheet data. I'm hoping someone here can suggest why this happens and how I can trim it to only that part of my worksheet that has data.
You have my gratitude in advance.
You have my gratitude in advance.
Code:
ChDir "C:/Users/Me/My Documents/Excel10/PB2013/Reports/"
Application.DisplayAlerts = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:=filename & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Application.DisplayAlerts = True