Use IsArray function to check if a variable is an array : Array Function « Data Type « VBA / Excel / Access / Word






Use IsArray function to check if a variable is an array

 
Sub arrayTest5()
   Dim intScores1 As Integer
   Dim intScores2(4) As Integer

   Debug.Print "Is intScores1 an array: " & IsArray(intScores1)
   Debug.Print "Is intScores2 an array: " & IsArray(intScores2)

End Sub

 








Related examples in the same category

1.Using the Array Function
2.The LBound and UBound functions return whole numbers that indicate the lower bound and upper bound indices of an array.
3.avoids the error "Subscript out of range"