ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






CONSTANTS:  MsgBox

MsgBox Constants

You may use either the CONSTANT (left column) or the VALUE (center column) in your code and get the same results.

Specifying buttons and icons:

CONSTANTVALUEDESCRIPTION
VBOKOnly0Show OK button
VBOKCancel1Show OK and cancel buttons
VBAbortRetryIgnore2Show abort, retry, ignore buttons
VBYesNoCancel3Show yes, no cancel buttons
VBYesNo4Show yes, no buttons
VBRetryCancel5Show retry, cancel buttons
VBCritical16Show critical message icon
VBQuestion32Show warning query button
VBExclaimation48Show warning message icon
VBInformation64Show information message icon
VBFaultButton10First button is default
VBFaultButton2256Second button is default
VBFaultButton3512Third button is default
VBFaultButton4768Fourth button is default

Message box response modality:

CONSTANTVALUEDESCRIPTION
VBApplicationModal0Current application will not continue until user responds to message box
VBSystemModal4098No application will continue until user responds to message box

Return values identifying which buttons were selected:

CONSTANTVALUEDESCRIPTION
VBOK1OK Button selected
VBCancel2Cancel button selected
VBAbort3Abort button selected
VBRetry4Retry button selected
VBIgnore5Ignore button selected
VBYes6Yes button selected
VBNo7No button selected