Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How do you give a user the choice of printer

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default How do you give a user the choice of printer

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


Gary


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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User choice listed in cell. Elzard Excel Worksheet Functions 3 February 24th 08 09:50 PM
AutoRun Macro with a delay to give user the choice to cancel the macro wanderlust Excel Programming 2 September 28th 07 04:09 PM
Prompt user to select a printer using a checkbox within a user Tom Ogilvy Excel Programming 0 January 10th 07 03:57 AM
Start Macro after user selects a choice from a pick list mathew Excel Discussion (Misc queries) 2 August 17th 06 03:28 PM
How to capture when a User changes the printer Jacob Excel Programming 1 February 23rd 06 07:59 PM


All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"