This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
MsgBox Constants
While working with a MsgBox, the following can be used in your code in place of the actual values:
MsgBox Arguments
Constant |
Value |
Description |
OKOnly |
0 |
OK button only (default) |
OKCancel |
1 |
OK and Cancel buttons |
AbortRetryIgnore |
2 |
Abort, Retry, and Ignore buttons |
YesNoCancel |
3 |
Yes, No, and Cancel buttons |
YesNo |
4 |
Yes and No buttons |
RetryCancel |
5 |
Retry and Cancel buttons |
Critical |
16 |
Critical message |
Question |
32 |
Warning query |
Exclamation |
48 |
Warning message |
Information |
64 |
Information message |
DefaultButton1 |
0 |
First button is default (default) |
DefaultButton2 |
256 |
Second button is default |
DefaultButton3 |
512 |
Third button is default |
ApplicationModal |
0 |
Application modal message box (default) |
SystemModal |
4096 |
System modal message box |
MsgBoxSetForeground |
65536 |
Specifies the message box window as the foreground window |
MsgBoxRight |
524288 |
Text is right aligned |
MsgBoxRtlReading |
1048576 |
Specifies text should appear as right-to-left reading on Hebrew and Arabic systems |
MsgBox Return Values
Constant |
Value |
Description |
OK |
1 |
OK button pressed |
Cancel |
2 |
Cancel button pressed |
Abort |
3 |
Abort button pressed |
Retry |
4 |
Retry button pressed |
Ignore |
5 |
Ignore button pressed |
Yes |
6 |
Yes button pressed |
No |
7 |
No button pressed |
See Also
Date Format Constants | DriveType Constants | File Attribute Constants | File Input/Output Constants | MsgBox Function | SpecialFolder Constants | Tristate Constants | Visual Basic Constants