ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select printer (https://www.excelbanter.com/excel-programming/290719-select-printer.html)

Mark[_17_]

select printer
 
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

Tom Ogilvy

select printer
 
This shows a dialog that allows selecting a printer:

application.Dialogs(xlDialogPrinterSetup).Show

--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
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




Mark[_17_]

select printer
 
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



-----Original Message-----
This shows a dialog that allows selecting a printer:

application.Dialogs(xlDialogPrinterSetup).Show

--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
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



.


Mark[_17_]

select printer
 
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



-----Original Message-----
This shows a dialog that allows selecting a printer:

application.Dialogs(xlDialogPrinterSetup).Show

--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
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



.


DennisE

select printer
 
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


All times are GMT +1. The time now is 02:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com