Export (0) Print
Expand All

MsgBoxStyle Enumeration 

Indicates which buttons to display when calling the MsgBox function.

When you call the MsgBox function, you can use the MsgBoxStyle enumeration in your code in place of the actual values. The Buttons argument takes the MsgBoxStyle enumeration members.

Member Constant Description

OKOnly

vbOKOnly

OK button only (default).

OKCancel

vbOKCancel

OK and Cancel buttons.

AbortRetryIgnore

vbAbortRetryIgnore

Abort, Retry, and Ignore buttons.

YesNoCancel

vbYesNoCancel

Yes, No, and Cancel buttons.

YesNo

vbYesNo

Yes and No buttons.

RetryCancel

vbRetryCancel

Retry and Cancel buttons.

Critical

vbCritical

Critical message.

Question

vbQuestion

Warning query.

Exclamation

vbExclamation

Warning message.

Information

vbInformation

Information message.

DefaultButton1

vbDefaultButton1

First button is default.

DefaultButton2

vbDefaultButton2

Second button is default.

DefaultButton3

vbDefaultButton3

Third button is default.

ApplicationModal

vbApplicationModal

Application modal message box.

SystemModal

vbSystemModal

System modal message box.

MsgBoxSetForeground

vbMsgBoxSetForeground

Foreground message box window.

MsgBoxRight

vbMsgBoxRight

Right-aligned text.

MsgBoxRtlReading

vbMsgBoxRtlReading

Right-to-left reading text (Hebrew and Arabic systems).

MsgBoxHelp

vbMsgBoxHelp

Help text.

Namespace: Microsoft.VisualBasic

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

Community Additions

ADD
Show:
© 2014 Microsoft