Variables & Constants in VBScript

Variables in VBScript are implicitly declared as being of type Variant. This means that a variable can contain any data type. Conversion functions can be used to convert between data types.


Data TypeDetail
BooleanTrue or False
ByteShort integer (0 to 255)
CurrencyFour decimal point, non-floating point number
LongLong integer
SingleSingle precision floating point number
DoubleDouble precision floating point number
Date/TimeNumber representing a date between Jan 1, 100 and Dec 31, 9999
StringVariable length string
ObjectAn object reference. A reference is a memory address location of the start of a section of memory (actual, virtual or storage) containing the object
EmptyAn uninitialized variable; 0 for numbers and "" for strings
NullDeliberate null initialization
ErrorAn error number as a result of a failed operation

Categories of Constants