MsgBoxResult Enumeration 

Indicates which button was pressed on a message box, returned by the MsgBox function.

Remarks

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 a MsgBoxResult enumeration value.

Members

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.

Requirements

Namespace: Microsoft.VisualBasic

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

See Also

Tasks

How to: Refer to an Enumeration Member

Reference

MsgBoxStyle Enumeration
MsgBox Function (Visual Basic)

Concepts

Intrinsic Constants and Enumerations
When to Use an Enumeration