how do you find what option was clicked in a messagebox with multiple buttons
It's not just Good, It's Good enough! Spelling Eludes Me
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
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
Select Case MsgBox("Choose option. ", vbAbortRetryIgnore) Case vbAbort Case vbRetry Case vbIgnore End Select
Regards, ™ As a gesture of gratitude please consider rating helpful posts. c",) Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system
Forum Rules