Method: IsArray for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: IsArray for VBS
Method: IsArray for VBS
Specifies whether an expression is an array.
vIsArray = Object.IsArray(expression)
| Object | VBS Object with this method. You do not need to specify this object. |
| expression | Variant Specifies any expression. |
| vIsArray | Variant The method IsArray returns True if the expression is an array. Otherwise the method returns False. |
The following example checks whether a variable is an array:
Dim MyArray Call MsgBox(IsArray(MyArray)) ' Returns False ReDim MyArray(3) Call MsgBox(IsArray(MyArray)) ' Returns True MyArray = Array("a","b","c") Call MsgBox(IsArray(MyArray)) ' Returns True