"Ron Crapo" wrote in message
...
We're calling Application.Dialogs
(xlDialogPrinterSetup).Show and want to test whether
the "Cancel" button was clicked by the user. How do we do
that?
Hi Ron,
Here's one way:
Sub ShowPrinterDialog()
Dim bResult As Boolean
bResult = Application.Dialogs(xlDialogPrinterSetup).Show
If bResult Then
''' OK was clicked
Else
''' Cancel was clicked.
End If
End Sub
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *