Printing Multiple "Named Ranges" to PDF

KRE

New Member
Joined
Apr 18, 2023
Messages
26
Office Version
  1. 365
Platform
  1. Windows
I have 52 weeks of reports over 12 monthly tabs. I currently have a print macro and a button assigned to each macro to print the week of the month I'm working on. However I want to be able to Print all 52 named ranges to a PDF with a click of a button. The 1st couple of macros are shown below. My named ranges are PrintArea1, PrintArea2, etc. Is there a way I can string all these macros together in one giant print macro to PDF?


'
' Print1 Macro
'

'
Sheets("dec").Select
Application.Goto Reference:="PrintArea1"
ActiveSheet.PageSetup.PrintArea = "PrintArea1"
Range("h61").Select
End Sub
Sub Print2()
'
' Print2 Macro
'

'
Sheets("dec").Select
Application.Goto Reference:="PrintArea2"
ActiveSheet.PageSetup.PrintArea = "PrintArea2"
Range("h109").Select
End Sub
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Suggest a consolidation of all ranges to be printed, into a single worksheet. Then print that worksheet to PDF.
 
Upvote 0
That would be ideal. But not possible. I mean even if what I showed previously is the only 2 print ranges and they are on two separate tabs. There has to be something you can do in a macro stacking the named ranges like...

Select.PrintArea1
Select.PrintArea2
Print.Pdf
 
Upvote 0
Re: "But not possible"
What is the reason that it cannot be done? You know what your workbook looks like, we are just guessing.
 
Upvote 0

Forum statistics

Threads
1,221,525
Messages
6,160,326
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top