I want to print all sheets to a single pdf file. an each sheet would be on the beginning of new page.
I've tried with:
Private Sub CommandButton9_Click()
ActiveWorkbook.Sheets.Select
With Selection
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"E:\tempo.pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
End With
End Sub
I've got a message :"Method 'Select' of object 'Sheets' failed."
Thanks!
instead of
activesheet.export...
Useactiveworkbook.export...
Each sheet will display by how you have the print setup for each sheet set.Or use Variables such as: