Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default 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....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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....



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display Items in ListBox sam[_8_] Excel Programming 7 April 28th 06 02:44 PM
ListBox display bug Ben Excel Programming 4 November 23rd 05 11:36 AM
Listbox Display Frank Kabel Excel Programming 1 April 1st 04 07:58 PM
Listbox Display Tom Ogilvy Excel Programming 0 April 1st 04 06:43 PM
User form with a listbox John Green[_2_] Excel Programming 4 December 30th 03 07:18 PM


All times are GMT +1. The time now is 05:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"