Printer Setup Dialog Box

M

Michael Smith

This works for me...but..Once I do this...

Application.Dialogs(xlDialogPrinterSetup).Show

if the user cancels the dialog box my macro fails. How can I direct the
cancel button back to a point in my macro.





*** Sent via Developersdex http://www.developersdex.com ***
 
J

JNW

Try what's below. This controls what happens when you press the cancel button.

res = Application.Dialogs(xlDialogPrint).Show
If res = False Then
' dialog cancelled
....[your code]
End If
 
R

Ron de Bruin

Try this

pr = Application.Dialogs(xlDialogPrinterSetup).Show
If pr = False Then
' User cancelled
Exit Sub
End If
 

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