This function determines the largest available subscript for the indicated dimension of an array.
UBound(arrayname, [dimension])
Returns a subscript.
The Ubound function typically is used with Lbound to determine the size of an array. For Windows CE-based applications created with the toolkit, the lower bound for any dimension is always 0. The following code example and table shows how UBound returns values for an array.
Dim A(100,3,4)
Statement |
Return Value |
UBound(A,1) | 100 |
UBound(A,2) | 3 |
UBound(A,3) | 4 |