When you call the MsgBox function, you can use the MsgBoxResult enumeration in your code in place of the actual values.
The MsgBox function returns the following MsgBoxResult enumeration values:
| Member | Constant | Description |
|---|---|---|
| OK | vbOK | OK button was pressed. |
| Cancel | vbCancel | Cancel button was pressed. |
| Abort | vbAbort | Abort button was pressed. |
| Retry | vbRetry | Retry button was pressed. |
| Ignore | vbIgnore | Ignore button was pressed. |
| Yes | vbYes | Yes button was pressed. |
| No | vbNo | No button was pressed. |