Print to single PDF Named Ranges on Multiple Sheets

zakasnak

Active Member
Joined
Sep 21, 2005
Messages
307
I have a workbook with 8 tabs containing named ranges that would like to print to a single PDF.

The previous owner of this workbook used this macro, but we've gone through some system changes & it no longer works as an active printer on LPT1.

Code:
Sub PDF_Print()
'
' PDF_Print Macro
' Macro recorded 10/30/2003 by Nbullard
'
' Keyboard Shortcut: Ctrl+a
'
    Application.ActivePrinter = "Adobe PDF on LPT1:"


    Application.Goto Reference:="Cover"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_1"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_2"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_3"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_4"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_5"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_6"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_7"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    
    Application.Goto Reference:="Table_8"
    Selection.PrintOut Preview:=False, Copies:=1
    Range("A1").Select
    Sheets("Data Entry").Select
    Range("C4").Select
    
End Sub

Can anyone help me?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,216,773
Messages
6,132,633
Members
449,740
Latest member
tinkdrummer

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