Error handling

  • Thread starter Thread starter Tim C
  • Start date Start date
T

Tim C

What I would like to do:

If Not IsError(ChDir [B5]) Then
ChDir [B5]
more code
End If

But of course IsError isn't for this kind of error. How should I do it?

Thanks,
Tim C
 
On Error Resume Next
ChDir [B5]
If Err.Number = 0 Then
'more code
Debug.Print "ok"
Else
'deal w/error
Debug.Print Err.Number
End If
 
Back
Top