|
|||
|
|||
|
Posted by Mark Alexander Bain Sep 17, 2009 |
There is no direct way to work out how many arrays there are in a VBScript multidimension array, however a simple VBScript function will do the job:
Function dimensions (inarray)
On Error Resume Next
Dim dims: dims = 0
Dim dim_check
Dim i: For i = 1 to 32
dim_check = ubound(inarray, i)
If Err.Number = 0 Then
dims = dims + 1
End If
Next
dimensions = dims
End Function
There's more on VBScript multidimensional arrays in Using Multidimensional Arrays with VBScript: How to Work with More than One Dimension in VBScript Programming.