Macro for Print Order

KAJ31

New Member
Joined
Jun 10, 2020
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Would like to print worksheets to PDF in a specific order. Current array prints the files, but put them in the order of how the tabs are arranged, not how listed in macro. Is there way to get the printouts inthe order needed?

VBA Code:
Sub Print_PDF_Region1()

Sheets(Array("SOO R1", "HIST R1", "Hourly R1", "FORECAST R1", "SOO R1 2100", "HIST R1 2100", "HOURLY R1 2100", "FORECAST R1 2100", "SOO R1 2500", "HIST R1 2500", "HOURLY R1 2500", "FORECAST R1 2500", "SOO R1 4200", "HOURLY R1 4200", "HIST R1 4200", "FORECAST R1 4200", "SOO R1 R100", "FORECAST R1 R100")).Select
            
  ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "Q:\P7 Region 1.pdf", Quality:=xlQualityStandard, _
        IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
        False
End Sub
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Do them one at a time, or rearrange the tabs before printing and put them back in the original order afterwards
 
Upvote 0
I am hoping to automate this, as there a 50+ tabs
 
Upvote 0

Forum statistics

Threads
1,216,081
Messages
6,128,695
Members
449,464
Latest member
againofsoul

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