Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Working with Multiple Printers.

Working With Multiple Printers

Written by Allen Wyatt (last updated July 18, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


3

You already know that Windows supports multiple printers. Using Excel with multiple printers can be a bother, however, since you must display the Print dialog box, change the printer, and then print the worksheet.

There is a way, however, that you can have one-click printing of your worksheets on a designated printer. To do this, simply create a macro that changes the printer and then prints the worksheets, as shown here:

Sub GoodPrinter()
    Application.ActivePrinter = "HP LaserJet"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub

When you create this macro on your system, make sure you change the printer name in the second line of the macro. It must exactly match the name of a printer on your system. (In this example the printer name is set to "HP LaserJet". You should change it to match the name of the printer you want used.)

The trick is to create one of these macros for each of the printers you use. You can then modify a toolbar so that each printer has its own print button. When you then click on the command or button, the appropriate macro is run and you get output on the desired printer.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2217) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Working with Multiple Printers.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Moving Breaks Quickly

Breaks in a document can be easily moved from one place to another using familiar editing techniques. The trick is to ...

Discover More

Formatting an ASCII Table with Tabs

If you get a document from a coworker that has tabs used to line up tabular information, you might want to change that ...

Discover More

Unknown Non-Printing Characters

When you paste information into Word from the internet, you may get more than just the plain text you hoped for. This tip ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (menu)

Specifying a Print Tray for a Worksheet

If you need to modify where a worksheet is printed (meaning, which paper tray it should use), Excel doesn't provide a lot ...

Discover More

Printing Based on Cell Contents

Would you like to have a worksheet automatically printed when a particular cell contains a specified value? You can ...

Discover More

Protecting Print Settings

Need to have your print settings always be a certain way? Tired of resetting the settings after others use the workbook ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2019-05-23 10:26:10

Sean Hayes

Hi,

This is probably the solution that I have been looking for.
The problem I have is that my spreadsheet asks the user in a pop up dialogue box how many copies they require. This would make the last line of this obsolete and I'm not sure on how I would incorporate it into the vba I already have.
The code i already have is :-

Sub PrintCurrentSheet(ByVal pFound As Range)
Select Case MsgBox("Print Supply & Fit or Supply Only?" & vbCrLf & "Please select Yes for Supply & Fit, or No for Supply Only", vbYesNo)
Case vbYes
Sheets("Labels").Select
Case vbNo
Sheets("Unbranded Labels").Select
End Select
Range("E1,O1,E22,O22") = pFound
Range("A10,J10,A31,J31") = pFound.Offset(0, IIf(rOnly, -8, -4))
Range("C10,M10,C31,M31") = pFound.Offset(0, IIf(rOnly, -7, -3))
Range("G10,Q10,G31,Q31") = pFound.Offset(0, IIf(rOnly, -6, -2))
Call ToggleOn

'ASKS HOW MANY COPIES TO PRINT
Do
NumberofCopies = Application.InputBox("How many copies do you want to print? Must enter 0-50", Type:=1)
If NumberofCopies = 0 Then ' If user clicks on Cancel button
Call ToggleOff
Exit Sub
End If
If NumberofCopies > 50 Then MsgBox "Max to print is 50 copies" Else Exit Do
Loop
ActiveSheet.PrintOut Copies:=NumberofCopies
Call ToggleOff
Sheets("Scan").Select
End Sub


2018-02-20 02:42:45

Syed M Husain

Sub GoodPrinter()
Application.ActivePrinter = "HP LaserJet"
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub

This macro does not work for excel 2003. It stops at Application.ActivePrinter = "Printer name"


2018-02-02 18:36:26

Mike

I don't know what I'm doing wrong but I tried to ceate a macro using your example and changing out the printer name and when I try to run it nothing happens. No error message but also no output to the printer. Can you give me any ideas what might be wrong with my macro? I am using Excel 2010. The file is stored on a network share but I have both enabled the macros and trusted the document. Thanks.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.