how do you find what option was clicked in a messagebox with multiple buttons
Printable View
how do you find what option was clicked in a messagebox with multiple buttons
Each button has it's own constant or number value.
There is vbYes, vbOk or vbCancel, for instance.
VB Code:
If MsgBox("Would You Like To Exit?", vbYesNo, "Confirm Exit") = vbYes Then 'unload form here ... End If
Here...
VB Code:
Select Case MsgBox("Choose option. ", vbAbortRetryIgnore) Case vbAbort Case vbRetry Case vbIgnore End Select