I'm sure there's a better way, but try this:

Code:
    Dim MyArray() As Integer
    ReDim MyArray(10)

    On Error Resume Next
    MsgBox UBound(MyArray)
    If Err.Number <> 0 Then
        MsgBox Err.Description
    End If
Then comment out the "ReDim" and run it again.