MsgBox "This form will be re-initialized", vbOKOnly, "Error"
Unload Me
frmError.Show
Exit Sub
Case 2
Resume Point1
Case 3
Resume 0
Case 4
Resume Next
Case 5
MsgBox "Fatal error, all data will be lost!", vbCritical, _
"Error"
End
End Select
End Sub
Note:To extend this error handler even further, you can use
Visual Basic to create a DLL (COM object) that can be used with
any Component Object Model (COM)-compliant application.
Developer Error Handler Add-in
Word 2007 contains an error handler add-in that greatly sim-
plifies ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.