Returns the maximum allowed array index for a particular dimension of an array.
...array.GetUpperBound(dimension)
Prerequisites
None
Parameters
dimension
A required numeric expression that specifies the index, from 0 to rank-1, of the dimension whose upper bound should be returned.
Remarks
In GPL, all array dimension indices start at 0 and end at the upper bound. This upper bound is the same value specified in a Dim or ReDim statement. The number of elements in an array dimension is 1 plus the upper bound value.
Examples
Dim array(3,4) As Integer
Dim d1, d2 As Integer
d1 = array.GetUpperBound(0) ' Returns the value 3
d2 = array.GetUpperBound(1) ' Returns the value 4
See Also