LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default PrintOut Method, Set ActivePrinter with a variable

I would like to have an Excel macro print to a printer defined in a
variable so I dont have to hard code the printer name in the code.

I have been successful with the following code:
ThisWorkbook.PrintOut ActivePrinter:="Printer Name"

What I would like to do is something like:
Set PrinterNameVariable = "Printer Name"
ThisWorkbook.PrintOut ActivePrinter:=PrinterNameVariable

Any ideas?

Thanks

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA ActivePrinter POM Excel Programming 3 February 23rd 05 10:08 AM
Printout method: in color, duplex [email protected] Excel Programming 3 January 4th 05 08:55 PM
Problem with the PrToFileName parameter when using the Printout method on a worksheet Prasad Vanka Excel Programming 6 May 14th 04 10:56 AM
Excel vba printout method Curtis[_4_] Excel Programming 11 October 28th 03 01:15 PM
Method 'ActivePrinter' of object '_Application' failed kiat Excel Programming 0 August 18th 03 03:45 PM


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"