Difference between Resume and Goto in error handling block

Posted by Rich Oliver on Stack Overflow See other posts from Stack Overflow or by Rich Oliver
Published on 2010-06-08T11:01:14Z Indexed on 2010/06/08 11:12 UTC
Read the original article Hit count: 261

Filed under:
|

I understand that in the following example a Resume statement should be used instead of a Goto statement.

Sub Method()
  On Error Goto ErrorHandler
  ...
CleanUp:
  ...
  Exit Function

ErrorHandler:
  Log error etc

  Err.Clear  'Is this line actually necessary?'

  Resume CleanUp 'SHOULD USE THIS'
  Goto CleanUp  'SHOULD NOT USE THIS'
End Sub

My question is what difference is there in the execution of the two?

© Stack Overflow or respective owner

Related posts about vb6

Related posts about error-handling