Share via


MsgBox Style Constants for Visual Basic 6.0 Users

The following table shows the Visual Basic 6.0 MsgBox Style constants and their Visual Basic 2008 equivalents.

Note

For backward compatibility, you can still use Visual Basic 6.0 MsgBox Style constants in Visual Basic 2008 code. For more information, see MsgBoxStyle Enumeration.

Visual Basic 6.0

Visual Basic 2008 Equivalent

vbOKOnly

MsgBoxStyle.OKOnly

vbOKCancel

MsgBoxStyle.OKCancel

vbAbortRetryIgnore

MsgBoxStyle.AbortRetryIgnore

vbYesNoCancel

MsgBoxStyle.YesNoCancel

vbYesNo

MsgBoxStyle.YesNo

vbRetryCancel

MsgBoxStyle.RetryCancel

vbCritical

MsgBoxStyle.Critical

vbQuestion

MsgBoxStyle.Question

vbExclamation

MsgBoxStyle.Exclamation

vbInformation

MsgBoxStyle.Information

vbDefaultButton1

MsgBoxStyle.DefaultButton1

vbDefaultButton2

MsgBoxStyle.DefaultButton2

vbDefaultButton3

MsgBoxStyle.DefaultButton3

vbDefaultButton4

No equivalent

vbApplicationModal

MsgBoxStyle.ApplicationModal

vbSystemModal

MsgBoxStyle.SystemModal

vbMsgBoxHelpButton

MsgBoxStyle.MsgBoxHelp

vbMsgBoxRight

MsgBoxStyle.MsgBoxRight

vbMsgBoxRtlReading

MsgBoxStyle.MsgBoxRtlReading

vbMsgBoxSetForeground

MsgBoxStyle.MsgBoxSetForeground

See Also

Reference

MsgBoxStyle Enumeration

Other Resources

Constant Equivalents for Visual Basic 6.0 Users

Constants and Enumerations in Visual Basic