View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Selecting a Printer on a network

You can pop up the select printer dialog and let them choose.

Application.Dialogs(xlDialogPrint).Show
or
Application.Dialogs(xlDialogPrinterSetup).Show




CJLuke wrote:

I have developed a spreadsheet uses a VBA print button, and the following is
the code currently assigned to it:

Application.ActivePrinter = "\\txhoro01\TX-HO-ROAKS-JD23 on Ne07:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\txhoro01\TX-HO-ROAKS-JD23 on Ne07:", Collate:=True

It selects this printer, and does a good job of printing here in my office.
The problem I have is that the spreadsheet will be distributed to other
people in different places who obviously have different printers. Is there a
way I can create a message box or something similar that will show a list of
the available printers on the network so you can simply select the printer
you would like to print to?


--

Dave Peterson