Skip to main content

IsArray

Returns a Boolean value indicating whether a variable is an array.

Structure

IsArray(varname)

Parameters

The varname argument can be any variable.

Description

IsArray returns True if the variable is an array; otherwise, it returns False. IsArray is especially useful with variants containing arrays.

Example

The following example uses the IsArray function to test whether MyVariable is an array:
Dim MyVariable
Dim MyArray(3)
MyArray(0) = "Sunday"
MyArray(1) = "Monday"
MyArray(2) = "Tuesday"
MyVariable = IsArray(MyArray) ' MyVariable contains 'True'.