isladogs
MVP / VIP
- Local time
- Today, 12:18
- Joined
- Jan 14, 2017
- Messages
- 18,868
This is my standard error handling code:
If you have something like MZ Tools, you can add line numbering & pin the error to a particular line
To test your error handling, you can raise an error using a line like
which will return 'Invalid use of Null' as the error description
Code:
Private Sub cboError_AfterUpdate()
On Error GoTo Err_Handler
'Procedure code here
Exit_Handler:
Exit Sub
Err_Handler:
strProc = "cboError_AfterUpdate"
MsgBox "Error " & Err.Number & " in " & strProc & " procedure: " & _
Err.Description, vbExclamation, "Application Error"
Resume Exit_Handler
End Sub
If you have something like MZ Tools, you can add line numbering & pin the error to a particular line
To test your error handling, you can raise an error using a line like
Code:
Err.Raise 94
which will return 'Invalid use of Null' as the error description