|
Post by Kelly Ethridge on Nov 5, 2006 12:34:14 GMT -5
Various attributes about an array can easily be determined.
To determine if an array has been initialized or not, use the cArray.IsNull method.
Dim a() As Long Debug.Print CorArray.IsNull(a) ReDim a(0) Debug.Print CorArray.IsNull(a)
To determine if the number of dimensions an array has, use CorArray.Rank.
Dim a(1, 1) As Long Debug.Print CorArray.Rank(a)
To determine the size of an array, use CorArray.Length.
Dim a(5 To 10) As Long Debug.Print CorArray.Length(a)
By default, the CorArray.Length method determines the size of the entire array spanning all dimensions. It can also determine the size of an individual dimension.
|
|