View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John G.[_4_] John G.[_4_] is offline
external usenet poster
 
Posts: 2
Default How to read settings from xlDialogPrint

Using Excel 2003 SP3.

Thanks.
John G.

"John G." wrote in message
...
I need to print several worksheets from a Excel command button click event
procedure. A printer selection dialog is to be displayed at the beginning
of the procedure, then selected settings are to be applied to the
worksheets before printing.

Private Sub btnTestPrint1_Click()
WorkSheets(1).Activate
Application.Dialogs(xlDialogPrint).Show

' Read what the user set

For i = 2 To 5
WorkSheets(i).PrintOut(PrintToFile:=<whatever the user set, ...
Next i
End Sub

Also, if a user makes a change to the printer setup via the
"Properties..." button on that dialog, how do I find and duplicate those
settings.

Any other suggestions will be greatly appreciated.

Thanks.
John G.