Hi,
I'm trying to export 3 Excel tabs as PDF. Everything works fine if I use>
Sheets(Array("REPORTING", "REPORTING 2", "REPORTING 3")).Select
Sheets("REPORTING").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, fileName:= _
"C:\Users\user\Desktop\1905 Sport-Holdings Reporting Template Current.pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
But I don't really like using select in my code. So I was trying something like>
Sheets(Array("REPORTING", "REPORTING 2", "REPORTING 3")).ExportAsFixedFormat Type:=xlTypePDF, fileName:= _
"C:\Users\user\Desktop\1905 Sport-Holdings Reporting Template Current.pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
To avoid the Select and ActiveSheet code, but that throws an error. Is there any way to accomplish this unifying the 3 lines of code in one or for this case it really has to be this way?
Thanks
Bookmarks