Specify Printer and Prompt for Number of Copies?

C

ChadDiesel

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
 
W

William Benson

Try:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top