Listbox to display ALL Available Printers to User on a Userfrom

C

Corey

Currently i have a macro that prints a selection without prompting what printer to use.
But i want to add a userform with a listbox and allow the users Printers that are available to
him/her to be listed there and a click of the selection to then send the selection to that printer.
It may be a literal printer or a pdf print program.

Corey....
 
D

Dave Peterson

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

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

Guest

hi Corey,

this may not be the prefect solution, but try:

Range("your_range").Select

With Application.Dialogs(xlDialogPrint)
.Show arg12:=1
End With

this selects your_range, then brings up the Print dialog (including the
drop-down list of printers) with Selection selected in the Print What section
- arg12:=1 does that. All the user then has to do is choose the printer and
click OK.

I'm sure you could use the Windows API to get a list of prints and populate
a userform from there but that is a bit of work. This way is easy and
familiar.

Chris
 

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