ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Help with macro to choose printer (https://www.excelbanter.com/new-users-excel/4688-help-macro-choose-printer.html)

Wind54Surfer

Help with macro to choose printer
 
Hi,

I am new to macros in Excel and this is what I did to print a worksheet:
------------------------------------------------------------------------
Range("A1:W35").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$W$35"
Selection.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
End Sub
------------------------------------------------------------------------
Works great except that I want to select the printer to use and the macro
won't stop at the point to choose printer.
Any way to work around this?
Any help is greatly appreciated.
Emilio

Paul B

Emilio,this will bring up the print dialog box, so you can pick a printer,
will that work?
Application.Dialogs(xlDialogPrint).Show


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Wind54Surfer" wrote in message
...
Hi,

I am new to macros in Excel and this is what I did to print a worksheet:
------------------------------------------------------------------------
Range("A1:W35").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$W$35"
Selection.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
End Sub
------------------------------------------------------------------------
Works great except that I want to select the printer to use and the

macro
won't stop at the point to choose printer.
Any way to work around this?
Any help is greatly appreciated.
Emilio




Wind54Surfer

Perfect!
Thanks Paul

"Paul B" wrote:

Emilio,this will bring up the print dialog box, so you can pick a printer,
will that work?
Application.Dialogs(xlDialogPrint).Show


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Wind54Surfer" wrote in message
...
Hi,

I am new to macros in Excel and this is what I did to print a worksheet:
------------------------------------------------------------------------
Range("A1:W35").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$W$35"
Selection.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
End Sub
------------------------------------------------------------------------
Works great except that I want to select the printer to use and the

macro
won't stop at the point to choose printer.
Any way to work around this?
Any help is greatly appreciated.
Emilio






All times are GMT +1. The time now is 11:13 AM.

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