in vb6 c'è la funzione Ubound
Ubound(array) che restituisce l'ultimo indice disponibile