According to the help file: Remarks
The value MESSAGEBOX( ) returns indicates which button in the dialog box was chosen. In dialog boxes with a Cancel button, pressing ESC to exit the dialog box returns the same value (2) as choosing Cancel.
Note that the shortest abbreviation for this function is MESSAGEB( ).
The following table lists the values MESSAGEBOX( ) returns for each button.
Return value Button
1 OK
2 Cancel
3 Abort
4 Retry
5 Ignore
6 Yes
7 No
You also use:
val=MESSAGEBOX("",4)
? val
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.