Is this what you want?

Code:
Dim MyArray(5, 9)

' Should return 9
RetVal = UBound(MyArray, 2)
Form1.Print RetVal