Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Specify Printer and Prompt for Number of Copies?

Hello,

I want to specify a printer for one of my spreadsheets. I do not want to
print to the default printer. I set up a button on the sheet with the
following code behind it:

Sub PrintToSpecificPrinter()


prt = Application.ActivePrinter


ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="LaserJet
1320"


Application.ActivePrinter = prt


End Sub

This works great, but is there a way to add code to prompt the user for the
number of copies they wish to print? Also, I don't want to collate. I know
this doesn't seem like it would save a lot of time, but my boss asked if
this was possible so we would not have to keep changing the printer. Any
information would be appreciated.

Chad


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Specify Printer and Prompt for Number of Copies?

Try:

ActiveWindow.SelectedSheets.PrintOut Copies:= inputbox("How many
copies?",,"1") , Collate:=False


"ChadDiesel" wrote in message
ink.net...
Hello,

I want to specify a printer for one of my spreadsheets. I do not want to
print to the default printer. I set up a button on the sheet with the
following code behind it:

Sub PrintToSpecificPrinter()


prt = Application.ActivePrinter


ActiveWindow.SelectedSheets.PrintOut Copies:=1,

ActivePrinter:="LaserJet
1320"


Application.ActivePrinter = prt


End Sub

This works great, but is there a way to add code to prompt the user for

the
number of copies they wish to print? Also, I don't want to collate. I know
this doesn't seem like it would save a lot of time, but my boss asked if
this was possible so we would not have to keep changing the printer. Any
information would be appreciated.

Chad




Reply
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
How do I acess the printer variable "number of copies"? Hemetman Excel Worksheet Functions 1 September 29th 09 12:25 PM
How do I access the printer variable "number of copies"? Hemetman Excel Worksheet Functions 1 September 29th 09 05:19 AM
Set default for "number of copies" on printer? Lindsay Setting up and Configuration of Excel 1 January 16th 09 07:12 PM
printer pauses after each page can't just print 20 copies mecato Excel Discussion (Misc queries) 1 June 6th 06 06:35 PM
prompt for # of copies in print macro SteveH Excel Programming 4 February 24th 05 07:31 PM


All times are GMT +1. The time now is 03:15 PM.

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

About Us

"It's about Microsoft Excel"