Built-In Functions in VBScript

Some built-in functions are shown here in detail. The rest of the built-in functions are listed at the end of this document. It is only necessary to be aware that a function for a specific requirement actually exists. Descriptions of all these functions are available online or in more detailed reference manuals.

String Functions

UCaseConverts to uppercase
LCaseConverts to lower case
LeftExtracts left (string, n) part of string for the first n characters from the left
RightExtracts right (string, n) part of string for the first n characters from the right
MidExtracts mid (string, n1, n2) from n1 characters to n2 characters

Math Functions

IntTruncates any value to an integer
RndProduces a random number

Date and Time Functions

Now10/20/1999 01:33:48 AM
Time01:33:48 AM

Dialog Boxes

There are a number of dialog boxes available.

MsgBox and InputBox Parameters

buttonsA comma delimited list of the buttons that appear in the dialog box
titleDialog box title
helpfileDisplay the file name providing online help
contextDisplays the context from which the user is accessing the help file

MsgBox and InputBox Return Values

ButtonReturn Value
vbOKOK button clicked
vbCancelCancel button clicked
vbAbortAbort button clicked
vbRetryRetry button clicked
vbIgnoreIgnore button clicked
vbYesYes button clicked
vbNoNo button clicked

VBScript Built-In Functions