How do you give a user the choice of printer

D

Darren

I have some VBA code (see below) to automate some printing tasks. But
as you can see, it will always print to the user's default printer.
Sometimes this is not what the user wants. What do I need to insert
into the code so that instead, the user receives a Print dialog box
whereby they can choose their preferred printer.

Regards,
Darren

With ActiveSheet.PageSetup
.Zoom = False
.Orientation = xlPortrait
.FitToPagesWide = 1
.FitToPagesTall = 3
.CenterHorizontally = True
.PrintTitleRows = "$1:$3"
.PrintTitleColumns = ""
.CenterFooter = "&""Arial,Bold Italic""www.austbook.net"
End With

Selection.PrintOut Copies:=1
 
G

Gary Keramidas

use this:
Application.Dialogs(xlDialogPrinterSetup).Show



With ActiveSheet.PageSetup
.Zoom = False
.Orientation = xlPortrait
.FitToPagesWide = 1
.FitToPagesTall = 3
.CenterHorizontally = True
.PrintTitleRows = "$1:$3"
.PrintTitleColumns = ""
.CenterFooter = "&""Arial,Bold Italic""www.austbook.net"
End With
Application.Dialogs(xlDialogPrinterSetup).Show

Selection.PrintOut Copies:=1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top