VBSCRIPT FUNCTIONS

 


Functions
 

 

Function

Description

Abs

Returns the absolute value of a number

Array

Returns a Variant containing an array

Asc

Returns the ANSI character code corresponding to the first letter in a string

Atn

Returns the arctangent of a number

CBool

Returns an expression that has been converted to a Variant of subtype Boolean

CByte

Returns an expression that has been converted to a Variant of subtype Byte

CCur

Returns an expression that has been converted to a Variant of subtype Currency

CDate

Returns an expression that has been converted to a Variant of subtype Date

CDbl

Returns an expression that has been converted to a Variant of subtype Double

Chr

Returns the character associated with the specified ANSI character code

CInt

Returns an expression that has been converted to a Variant of subtype Integer

CLng

Returns an expression that has been converted to a Variant of subtype Long

Cos

Returns the cosine of an angle

CreateObject

Returns a reference to an Automation Object

CSng

Returns an expression that has been converted to a Variant of subtype Single

CStr

Returns an expression that has been converted to a Variant of subtype String

Date

Returns the current system date

DateAddFunction

Returns a date to which a specified time interval has been added

DateDiff

Returns the number of intervals between two dates

DatePart

Returns the specified part of a given date

DateSerial

Returns a Variant of subtype Date for a specified year, month, and day

DateValue

Returns a Variant of subtype Date

Day

Returns a whole number between 1 and 31, inclusive, representing the day of the month

Escape

Encodes a string so it contains only ASCII characters.

Eval

Evaluates an expression and returns the result.

Exp

Returns e (the base of natural logarithms) raised to a power

Filter

Returns a zero-based array containing subset of a string array based on a specified filter criteria

Fix/Int

Returns the integer portion of a number

FormatCurrency

Returns an expression formatted as a currency value using the currency symbol defined in the system control panel

FormatDateTime

Returns an expression formatted as a date or time

FormatNumber

Returns an expression formatted as a number

FormatPercent

Returns an expression formatted as a percentage (multiplied by 100) with a trailing % character

GetLocale

Returns the current locale ID value.

GetObject

Returns a reference to an ActiveX object from a file

GetRef

Returns a reference to a procedure that can be bound to an event.

Hex

Returns a string representing the hexadecimal value of a number

Hour

Returns a whole number between 0 and 23, inclusive, representing the hour of the day

InputBox

Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box.

InStr

Returns the position of the first occurrence of one string within another

InStrRev

Returns the position of an occurrence of one string within another, from the end of string

Int/Fix

Returns the integer portion of a number

IsArray

Returns a Boolean value specifying whether a variable is an array

IsDate

Returns a Boolean value specifying whether an expression can be converted to a date

IsEmpty

Returns a Boolean value specifying whether a variable has been initialized

IsNull

Returns a Boolean value that indicates whether an expression contains no valid data

IsNumeric

Returns a Boolean value specifying whether an expression can be evaluated as a number

IsObject

Returns a Boolean value specifying whether an expression references a valid Automation object

Join

Returns a string created by joining a number of substrings contained in an array

LBound

Returns the smallest available subscript for the specified dimension of an array

LCase

Returns a string that has been converted to lowercase

Left

Returns a specified number of characters from the left side of a string

Len

Returns the number of characters in a string or the number of bytes required to store a variable

LoadPicture

Returns a picture object

Log

Returns the natural logarithm of a number

LTrim

Returns a copy of a string without leading spaces

Mid

Returns a specified number of characters from a string

Minute

Returns a whole number between 0 and 59, inclusive, representing the minute of the hour

Month

Returns a whole number between 1 and 12, inclusive, representing the month of the year

MonthName

Returns a string specifying the specified month

MsgBox

Displays a message in a dialog box, waits for the user to click a button, and returns a value indicating which button the user clicked.

Now

Returns the current date and time according to the setting of your computer's system date and time

Oct

Returns a string representing the octal value of a number

Replace

Returns a string in which a specified substring has been replaced with another substring a specified number of times

RGB

Returns a whole number representing an RGB color value.

Right

Returns a specified number of characters from the right side of a string

Rnd

Returns a random number

Round

Returns a number rounded to a specified number of decimal places

RTrim

Returns a copy of a string without trailing spaces

ScriptEngine

Returns a string representing the scripting language in use.

ScriptEngineBuildVersion

Returns the build version number of the script engine in use.

ScriptEngineMajorVersion

Returns the major version number of the script engine in use.

ScriptEngineMinorVersion

Returns the major version number of the script engine in use.

Second

Returns a whole number between 0 and 59, inclusive, representing the second of the minute

SetLocale

Sets the global locale and returns the previous locale.

Sgn

Returns an integer specifying the sign of a number

Sin

Returns the sine of an angle

Space

Returns a string consisting of the specified number of spaces

Split

Returns a zero-based, one-dimensional array containing a specified number of substrings

Sqr

Returns the square root of a number

StrComp

Returns a value specifying the result of a string comparison

String

Returns a repeating character string of the length specified

StrReverse

Returns a string in which the character order of a specified string is reversed

Tan

Returns the tangent of an angle

Time

Returns a Variant of subtype Date specifying the current system time

Timer

Returns a Variant of subtype Date containing the time for a specific hour, minute, and second

TimeSerial

Returns a Variant of subtype Date containing the time for a specific hour, minute, and second

TimeValue

Returns a Variant of subtype Date containing the time

Trim

Returns a copy of a string without leading and trailing spaces

TypeName

Returns a string that provides Variant subtype information about a variable

UBound

Returns the largest available subscript for the specified dimension of an array

UCase

Returns a string that has been converted to uppercase

Unescape

Decodes a string encoded with the Escape function.

VarType

Returns a value specifying the subtype of a variable

Weekday

Returns a whole number representing the day of the week

WeekdayName

Returns a string specifying the specified day of the week

Year

Returns a whole number representing the year

 



We are committed to continuously improving user satisfaction, Computer Doctor welcomes your product concepts, feature requests or comments.
Please phone Tech Support on 0755924733 for additional support.

   

Yes

4

3

2

No

 

Why did you rate this information this way?

 

Is this information Useful?

Is this information accurate?

Your email address (optional)