

The above values are logically divided into four groups: The first group(0 to 5) indicates the buttons to be displayed in the message box. All applications will not work until the user responds to the message box. The current application will not work until the user responds to the message box.Ĥ096 vbSystemModal System modal. The Buttons parameter can take any of the following values −ġ vbOKCancel Displays OK and Cancel buttons.Ģ vbAbortRetryIgnore Displays Abort, Retry, and Ignore buttons.ģ vbYesNoCancel Displays Yes, No, and Cancel buttons.ĥ vbRetr圜ancel Displays Retry and Cancel buttons.ġ6 vbCritical Displays Critical Message icon.ģ2 vbQuestion Displays Warning Query icon.Ĥ8 vbExclamation Displays Warning Message icon.Ħ4 vbInformation Displays Information Message icon.Ġ vbDefaultButton1 First button is default.Ģ56 vbDefaultButton2 Second button is default.ĥ12 vbDefaultButton3 Third button is default.ħ68 vbDefaultButton4 Fourth button is default.Ġ vbApplicationModal Application modal. If context is provided, helpfile must also be provided. A Numeric expression that identifies the Help context number assigned by the Help author to the appropriate Help topic. A String expression that identifies the Help file to use to provide context-sensitive help for the dialog box.Ĭontext − An Optional Parameter. If the title is left blank, the application name is placed in the title bar. A String expression displayed in the title bar of the dialog box.

If left blank, the default value for buttons is 0.

A Numeric expression that specifies the type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box. If the message extends to more than a line, then we can separate the lines using a carriage return character (Chr(13)) or a linefeed character (Chr(10)) between each line.īuttons − An Optional Parameter. The maximum length of prompt is approximately 1024 characters. A String that is displayed as a message in the dialog box. The MsgBox function displays a message box and waits for the user to click a button and then an action is performed based on the button clicked by the user. It can be a message box to display a message to a user or an input box with which user can enter the values. VBScript allows the developers to interact with the user effectively.
