ExcelTip.com
ExcelTip.com
Account Icon Account Icon Account Icon
Google Exceltip.com
JOIN OUR NEWSLETTER
  and receive for joining:
Free eBook Learn More!
Free Excel ADD-IN
Free Weekly Excel Tip
4 e-books in cd-rom
F1 Formulas & Functions
F1 Formulas & Functions
F1 EXCEL
F1 eBook (Spanish)
F1 EXCEL
Financial Statements.xls
 

» Change the default printer using VBA in Microsoft Excel
VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
CATEGORY: Printing in VBA


This example macro shows how to print a selected document to another printer then the default printer.
This is done by changing the property Application.ActivePrinter :
Sub PrintToAnotherPrinter()
Dim STDprinter As String
    STDprinter = Application.ActivePrinter
    Application.ActivePrinter = "microsoft fax on fax:" 
    ' change printer
    ActiveSheet.PrintOut 
    ' prints the active sheet
    Application.ActivePrinter = STDprinter 
    ' change back to standard printer
End Sub
Rate this tip
12 34 5
  RATING: 3.47
  VIEWS: 39812

READER COMMENTS (view all comments)


No comments have been submitted.


REGISTERED USERS - Click here to post comments


GUESTS (Click here to register)
Name
Comment Title
Comments

Special Edition Using Microsoft Outlook 2002

Keys to Reading an Annual Report (Barron's Business Keys)

Essentials of Accounting and Post Test Booklet 8, Eighth Edition

The 22 Immutable Laws of Marketing : Exposed and Explained by the World's Two

The One Page Business Plan: Start With a Vision, Build a Company!

Special Edition Using Microsoft Access 2002

RELATED MICROSOFT EXCEL TIPS


Convert PDF Files to Excel


Excel VBA books
Accounting books
Business Plans
MS Office books
Taxes books

VIEW ALL BOOKS