How to read settings from xlDialogPrint

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.
 

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