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

Easily Changing Links

If you have linked information in your worksheets, you may want a way you can easily change the targets to which those ...

Discover More

Hiding Rows Based on Two Values

It's easy to use filtering to hide rows based on the value in a cell, but how do you hide rows based on the values in two ...

Discover More

Counting Atoms in a Chemical Formula

Chemical formulas use a notation that shows the elements and the number of atoms of that element that comprise each ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (menu)

Printing an Entire Workbook by Default

Need to print an entire workbook? It's as easy as adding a single line of code to your macros.

Discover More

Repeating Rows on a Printout Except On the Last Page

When setting up a worksheet for printing, you can specify that Excel repeat some of your rows at the top of each page ...

Discover More

Printing a Number of Different Pages

If you don't need to print an entire workbook, it can be confusing to figure out how to print just certain pages. This ...

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 1 + 1?

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.