Option ExplicitPrivate Sub Command1_Click()
    Dim a()
    Debug.Print ismalloc(a)
    ReDim a(10)
    Debug.Print ismalloc(a)
End SubPrivate Function ismalloc(ByRef a()) As Boolean
    On Error GoTo errhandle
    Dim i As Integer
    i = UBound(a)
    ismalloc = True
    Exit Function
errhandle:
    Err.Clear
    ismalloc = False
End Function