ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple worksheet named ranges to PDF (https://www.excelbanter.com/excel-programming/402119-multiple-worksheet-named-ranges-pdf.html)

Cresta

Multiple worksheet named ranges to PDF
 
Hello
I have been given the task of exporting multiple named ranges from different
sheets to a pdf file.

I can do it from a single sheet with many ranges using the following code

Range("A8:G19,A83:N96").Select
Selection.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
"c:\filename.pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas _
:=False, OpenAfterPublish:=True

Could anyone point me in the right direction for ranges on differnt sheets.
Thanks


All times are GMT +1. The time now is 06:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com