BuiltIn dialogs value

  • Thread starter Thread starter Vitalya
  • Start date Start date
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.
 
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
 
Back
Top