![]() |
Listbox to display ALL Available Printers to User on a Userfrom
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.... |
Listbox to display ALL Available Printers to User on a Userfrom
You can pop up the select printer dialog and let them choose.
Application.Dialogs(xlDialogPrint).Show or Application.Dialogs(xlDialogPrinterSetup).Show Corey wrote: 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.... -- Dave Peterson |
Listbox to display ALL Available Printers to User on a Userfrom
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 "Corey" wrote: 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.... |
All times are GMT +1. The time now is 12:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com