Msgbox Function: Yourmsg Msgbox (Prompt, Style Value, Title)
Msgbox Function: Yourmsg Msgbox (Prompt, Style Value, Title)
Msgbox Function: Yourmsg Msgbox (Prompt, Style Value, Title)
The objective of MsgBox is to produce a pop-up message box and prompt the user to click on a
command button before he /she can continues. This format is as follows:
yourMsg=MsgBox(Prompt, Style Value, Title)
The first argument, Prompt, will display the message in the message box. The Style Value will
determine what type of command buttons appear on the message box, please refer to Table 12.1 for
types of command button displayed. The Title argument will display the title of the message board.
Style Value
0
1
2
3
4
5
Named Constant
Buttons Displayed
vbOkOnly
vbOkCancel
vbAbortRetryIgnore
vbYesNoCancel
vbYesNo
vbRetryCancel
Ok button
Ok and Cancel buttons
Abort, Retry and Ignore buttons.
Yes, No and Cancel buttons
Yes and No buttons
Retry and Cancel buttons
Value
Named Constant
vbOk
vbCancel
vbAbort
vbRetry
vbIgnore
vbYes
Button
Clicked
Ok
button
Cancel
button
Abort
button
Retry
button
Ignore
button
Yes
button
No
button
vbNo
Named Constant
16
vbCritical
32
vbQuestion
48
vbExclamation
64
vbInformation
Icon