ExitPoint vs. Err_Click

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm am trying to put the finishing touches on a very large Access 2003 split
mdb database. I have two questions about the VBA code.

1) Is it important to have an On Error declaration for every subroutine?

2) Is there a difference betwen these two examples, or would they both work
in any given sub?

Ex 1
Private Sub Whatever
On Error GoTo ErrorPoint
(Sub)
ExitPoint:
Exit Sub
ErrorPoint:
MsgBox Err.Description
Resume ExitPoint
End Sub

Ex 2
Private Sub Whatever
On Error GoTo Err_Whatever
(Sub)
Exit_Whatever
Exit Sub
Err_Whatever
MsgBox Err.Description
Resume Exit_Whatever
End Sub
 
Thank you - I understand it very clearly now. And being a fan of good
practice, I will insure I have them all properly defined. Thanks again!
 
Back
Top