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

Selective Summing

If you want to add up the contents of a range of cells based on what is contained in a different range of cells, you need ...

Discover More

Removing Hyperlinks without a Macro

If you have a whole slew of hyperlinks in a worksheet and you want to get rid of them, it's easier than you think. This ...

Discover More

Counting with Formulas

When you need to count a number of cells based upon a single criteria, the standard function to use is COUNTIF. This tip ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 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

Massive Printouts

Have you ever wanted to do a simple printout, only to find that Excel spit out dozens of pages, and most of them were ...

Discover More

Speeding Up Printing

Changing a couple of the print settings in Excel can speed up the printing of your worksheets. This tip examines those ...

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 two more than 9?

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.