Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi!!
I use this Range("print!a1:n71").PrintOut And the range be printet thats ok but how can i make it so i can choose a printer before printing Best regards Alvin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you know the name of the printer, you can set this property:
curPrinter= application.ActivePrinter Application.ActivePrinter = <desired printer ....after printing, reset to original printer application.ActivePrinter = curPrinter If you don't know the name of the desired printer, you'd need to enumerate the printers available(investigate the Windows EnumPrinters API) and offer users a means of selecting the appropriate printer. "Alvin Hansen" wrote: hi!! I use this Range("print!a1:n71").PrintOut And the range be printet thats ok but how can i make it so i can choose a printer before printing Best regards Alvin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Alvin
Someting along these lines. Sub ChoosePrinter() 'Leo Heuser 11-3-2005 Dim ActPrinter As String Dim Answer As Boolean With Application ActPrinter = .ActivePrinter Answer = .Dialogs(xlDialogPrinterSetup).Show End With If Answer = False Then Exit Sub Else 'Printout here End If Application.ActivePrinter = ActPrinter End Sub -- Best Regards Leo Heuser Followup to newsgroup only please. "Alvin Hansen" skrev i en meddelelse ... hi!! I use this Range("print!a1:n71").PrintOut And the range be printet thats ok but how can i make it so i can choose a printer before printing Best regards Alvin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Leo
Its working Regards Alvin "Leo Heuser" skrev: Hi Alvin Someting along these lines. Sub ChoosePrinter() 'Leo Heuser 11-3-2005 Dim ActPrinter As String Dim Answer As Boolean With Application ActPrinter = .ActivePrinter Answer = .Dialogs(xlDialogPrinterSetup).Show End With If Answer = False Then Exit Sub Else 'Printout here End If Application.ActivePrinter = ActPrinter End Sub -- Best Regards Leo Heuser Followup to newsgroup only please. "Alvin Hansen" skrev i en meddelelse ... hi!! I use this Range("print!a1:n71").PrintOut And the range be printet thats ok but how can i make it so i can choose a printer before printing Best regards Alvin |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome, Alvin.
Thanks for the feedback :-) -- Best Regards LeoH "Alvin Hansen" skrev i en meddelelse ... Thanks Leo Its working Regards Alvin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
choose. | Excel Discussion (Misc queries) | |||
choose? | Excel Discussion (Misc queries) | |||
members on my network printer not able to print to default printer | Excel Discussion (Misc queries) | |||
Printer Multiple Worksheets with a particular Printer Setting | Excel Worksheet Functions | |||
Help with macro to choose printer | New Users to Excel |