PDA

View Full Version : Trouble exporting multiple sheets to PDF



kellykap
04-11-2013, 01:47 PM
I have a tool for work that gathers information unique to each state. There is a button the user can click that creates a PDF report made up of 5 worksheets in the tool. This works just fine on Windows, but in Mac Excel 2011, only the last page is made into the PDF. Can anyone please help? Code shown below

Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Quality:= xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=openPDF, _
Filename:=Application.ActiveWorkbook.Path & "\" & Range("state_abbrev").Value & _
" - File Name Here - " & Format(Date, "mmddyyyy") & "." & Format(Time(), "hhmmss") & ".pdf"

Thanks for the help :)