Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MsgBoxResult Enumeration

MsgBoxResult Enumeration

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

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public enum MsgBoxResult

Member nameDescription
AbortAbort button was pressed. This member is equivalent to the Visual Basic constant vbAbort.
CancelCancel button was pressed. This member is equivalent to the Visual Basic constant vbCancel.
IgnoreIgnore button was pressed. This member is equivalent to the Visual Basic constant vbIgnore.
NoNo button was pressed. This member is equivalent to the Visual Basic constant vbNo.
OkOK button was pressed. This member is equivalent to the Visual Basic constant vbOK.
RetryRetry button was pressed. This member is equivalent to the Visual Basic constant vbRetry.
YesYes button was pressed. This member is equivalent to the Visual Basic constant vbYes.

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft