The UBOUND function returns the upper bound of a dimension of a compile-time or run-time dimensioned array. Example dim-num% = UBOUND(A%)
1 – Syntax
num-var = UBOUND (array-name [,num-exp])