The Ubound() function returns the highest number of your array. For example, If I had this code:
Code:Option Base 1 Dim MyArray() as Integer Private Sub Form_Load() Redim MyArray(15) MsgBox "Ubound returns " & ubound(myarray) & ". Lbound returns " & lbound(myarray) & "." Msgbox "Ubound should return 15 while lbound will return 1 (option base 1)." End Sub




Reply With Quote