View Single Post
  #4   Report Post  
Don Guillett
 
Posts: n/a
Default

look at this
http://tinyurl.com/8pz5c

--
Don Guillett
SalesAid Software

"prizm1" wrote in message
...
That's something I can resort to, just displaying the Print dialog and
having the user select from their list of printer names.

The thing is, as I change workstations, the printers available to me
from the on-network Excel file I'm designing can change. Some stations
have the network printer as default while others have a locally attached
printer as default. I am trying to create a form that offers the user a
choice between the locally attached printer and the network printer. It
would be great if I could access the Print Dialog Name drop-down list of
printers directly in VBA and import them into a list box user form
unique to that workstation. The form would list both the network printer
and the printer local to that workstation (just as the Print dialog
does)with the local printer attached to that particular comp being
different from what would be listed for a different workstation with a
different locally attached printer.

Since the Macro Recorder can "extract" the printer names, I assume that
there must be some obscure VBA code I can manually enter to get at these
local, unique-station printer names directly.



Don Guillett wrote:
Does this help?

Sub getprinters()
Application.Dialogs(xlDialogPrinterSetup).Show
End Sub