Returns a Boolean value indicating whether a variable points to an array.
Public Function IsArray(ByVal VarName As Object) As Boolean
IsArray returns True if the variable points to an array; otherwise, it returns False. IsArray is especially useful with objects containing arrays.
This example uses the IsArray function to check if several variables refer to an array.
Dim MyArray(4), YourArray(3) As Integer ' Declare array variables. Dim MyString As String Dim MyCheck As Boolean MyCheck =IsArray(
MyArray)
' Returns True. MyCheck =IsArray(
YourArray)
' Returns True. MyCheck = IsArray(MyString) ' Returns False.