How to read settings from xlDialogPrint

  • Thread starter Thread starter John G.
  • Start date Start date
J

John G.

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.
 
Back
Top