enumAMsgBoxType Enum

Integer constants specifying the type of buttons and icon to be displayed in a MsgBox dialog. If nothing is given, it displays the "OK" button message box with the Exclamation (warning) icon. The icon constants are used also with the MsgBeep procedure to sound one of the system pre-defined sounds. Besides message box types and Icons, you can also specify message-box modality as well as message-box default buttons.

Constants

One of the following values:
 

Name

Value

Description

aMsgOk

0*

Display OK button only.

aMsgOkCancel

1

Display OK and Cancel buttons.

aMsgAbortRetryIgnore

2

Display Abort, Retry, and Ignore buttons.

aMsgYesNoCancel

3

Display Yes, No, and Cancel buttons.

aMsgYesNo

4

Display Yes and No buttons.

aMsgRetryCancel

5

Display Retry and Cancel buttons.

aMsgAbort

6

Abort

aMsgAbortPause

7

Abort, Pause

aMsgAbortIgnorePause

8

Abort, Ignore, Pause

aMsgAbortRetryIgnorePause

9

Abort, Retry, Ignore, Pause

aMsgClose

10

Close

Combined with one of the following icon constants:
 

Name

Value

Description

aMsgIconHand

0x10

Hand (stop) icon

aMsgIconQuestion

0x20

Question icon

aMsgIconExclamation

0x30*

Exclamation (warning) icon

aMsgIconAsterisk

0x40

Asterisk (information) icon

aMsgIconNoDefault

0x50

No Default icon

Message-box Default Buttons:
 

Name

Value

Description

aMsgDefaultButton1

0x000

Default button 1

aMsgDefaultButton2

0x100

Default button 2

aMsgDefaultButton3

0x200

Default button 3

aMsgDefaultButton4

0x300

Default button 4

aMsgDefaultButton5

0x400

Default button 5

Message-Box Modality:

The default modality would be the user must respond to the message box before continuing work in the current window. However, the user can move to the windows of other applications and work in those windows. Or you can choose one of the following (Version 5 or newer):
 

Name

Value

Description

aMsgSystemModal

0x1000

System modal, Same as aMsgTaskModal, however, window will show on top of all other applications windows.

aMsgTaskModal

0x2000

Task modal,  user must close this window before attending any other window that belong to this application. This is the default behavior of MsgBox.

Applies to

 

MsgBox

MsgBeep