Wednesday, April 14, 2010

VB Scripting - Constants - Built In Constants

Previous11121314151617181920Next


What is a Built in Constant in VB script?

Built in Constants are those which are already created and stored in VB Library and they cannot be changed and they can be used as it is for various purposes. They in turn help you to print information with meaning and also messages with some action.



Different types of Built in Constants

Please find the list of built in constant and their meaning.

Built in ConstantsWhat it does
vbOKOnlyOK button only
vbOKCancelOK and Cancel buttons
vbAbortRetryIgnoreAbort, Retry, and Ignore buttons
vbYesNoCancel Yes, No, and Cancel buttons
vbYesNoYes and No buttons
vbRetryCancel Retry and Cancel buttons
vbCritical Critical Message icon
vbQuestion Warning Query icon
vbExclamation Warning Message icon
vbInformation Information Message icon
vbDefaultButton1 First button is default
vbDefaultButton2 Second button is default
vbDefaultButton3 Third button is default
vbDefaultButton4 Fourth button is default
vbApplicationModal Application modal i.e. the current application will not work until the user responds to the message box
vbSystemModal System modal i.e. all applications wont work until the user responds to the message box


Example

Const TEST = "Are you sure you want to exit"
msgbox TEST, vbYesNo

The message box displayed will be like this with Yes and No buttons.



Previous11121314151617181920Next

No comments:

Post a Comment