select printer

M

Mark

Is there possible point print for another printer?
My userform print on activeprinter (useform.PrintForm).
I'd like in order user oneself select another divice no-
activeprinte, but i don't know how. List of printers is
different for another users.
Any help will be appreciate..
Regards
Mark
 
T

Tom Ogilvy

This shows a dialog that allows selecting a printer:

application.Dialogs(xlDialogPrinterSetup).Show
 
M

Mark

Hi Tom,
By means of your tip i showed list of available printers,
but i can't print my userform on another printer then
active.
Below part of my code in body userform:

msg = MsgBox("Print on activeprinter?", vbYesNo, "Info")

Select Case msg
Case vbYes
Me.PrintForm

Case vbNo
sOldPrinter = Application.ActivePrinter
Application.Dialogs(xlDialogPrinterSetup).Show
sNewPrinter = Application.ActivePrinter
Application.ActivePrinter = sOldPrinter
Me.PrintForm
End Select
Request:
What's wrong on my script?
Do you explain it? Please
Regards
Mark
 
M

Mark

Hi Tom,
By means of your tip i showed list of available printers,
but i can't print my userform on another printer then
active.
Below part of my code in body userform:

msg = MsgBox("Print on activeprinter?", vbYesNo, "Info")

Select Case msg
Case vbYes
Me.PrintForm

Case vbNo
sOldPrinter = Application.ActivePrinter
Application.Dialogs(xlDialogPrinterSetup).Show
sNewPrinter = Application.ActivePrinter
Application.ActivePrinter = sOldPrinter
Me.PrintForm
End Select
Request:
What's wrong on my script?
Do you explain it? Please
Regards
Mark
 
D

DennisE

Mark,

If you bring up Excel Help for the PrintForm method, you will see that
it sends the UserForm to the default
printer found in the Windows Control
panel, irrespective of what the active
printer might be under Excel.

-- Dennis Eisen
 
Top