BuiltIn dialogs value

V

Vitalya

Hi all,
How can I check what button user press in builtIn dialog?
For example I want to check If user press 'Cancel' button in the Print dialog.
In MSWord i implement DocumentBeforePrint function and call:
long buttonValue = pDialog->Display(). If buttonValue == 0 - user press
"Cancel".
How can I do it in Excel.
 
J

JLGWhiz

Excel is not so kind when using VBA to test the "Cancel" value. It could be
"" or it could be "False" depending on the dialog box you are testing. If
believe that in general you could use"

aVar = <DialogBoxValue>
If aVar = "" Or aVar = "False" Then
'result
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