Table of contents
Collapse the table of content
Expand the table of content

IsArray Function

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Returns a Boolean value indicating whether avariable is anarray. SyntaxIsArray(varname) The required varnameargument is anidentifier specifying a variable. RemarksIsArray returns True if the variable is an array; otherwise, it returns False. IsArray is especially useful withvariants containing arrays.


This example uses the IsArray function to check if a variable is an array.

Dim MyArray(1 To 5) As Integer, YourArray, MyCheck    ' Declare array variables.
YourArray = Array(1, 2, 3)    ' Use Array function.
MyCheck = IsArray(MyArray)    ' Returns True.
MyCheck = IsArray(YourArray)    ' Returns True.
© 2017 Microsoft