I read somewhere that exiting out of an error handling block is not recommended. Sadly they did not give an explanation why?
I was curious why is it so. I did find something related to this in the discussion at "On Error Goto 0" before Exit Function but not sure if that is the definitive answer. They talk about the Err object not being cleared. Is that the only issue and if so is there a work around?
Is this wrong? If it is, then what is the recommended way of exiting the function? I am not a huge supporter of go to statements, they make the code harder to follow.
Private Sub Foo2()
On Error Resume Next
'Multiple lines of code
If Not Foo(arg1,arg2) Then
Exit Sub 'Can I exit here?
End If
'Multiple lines of code
On Error GoTo 0
End Sub