Public Sub array_test()
'if an error occurs ignore error and continue
On Error resume Next
Dim Ar() as Variant
If (a > b) then
ReDim Ar(3)
End If
'Note if a subscript was not assigned to the array an
'error (9) will be triggered.
If Ubound(Ar)=3 then
' Do some stuff
End If