VBA IsArray Function

The Excel VBA IsArray function returns True if the variable provided is an array. It will return False otherwise.

VBA IsArray Function Syntax

The syntax for the IsArray function in VBA is:
function examples:

IsArray( Variable )

where Variablecan be any type of variable

Example usage of VBA IsArray

To see more tips and trick with VBA Arrays see my tutorial otherwise below a few examples:

 
Dim arr As Variant
arr = 10    
Debug.Print IsArray(arr) 'Result: False. Is not an array
    
ReDim arr(10) 
Debug.Print IsArray(arr) 'Result: True. Is an array

As you noticed the VBA ReDim statement above allows you to redefine the size of an existing array or redefine a Variant as an array.