Friday, September 9, 2011

VBScript Array

VBScript Array
VBScript Array function returns a Variant containing an array.

Syntax of VBScript Array

argumentlist is a comma-delimited list of values that are assigned to the elements of an array contained with the Variant. If no arguments are specified, an array of zero length is created.

Example 1 of VBScript Array
myarray = array("One", "Two", "Three", "Four")
for i=0 to UBOUND(myarray)
msgbox (myarray(i)) 'Show array contents i.e. first time One, Second time Two and so on...

Example 2 of VBScript Array
for each x in Arr
msgbox x 'Show array contents i.e. first time 5, Second time 10 and so on...

Also See:
Complete List of VBScript Array Functions