A Generic Procedure Skeleton with Basic Error Handling
Sub GenericProcedure()
On Error GoTo ErrHandler
Exit Sub
ErrHandler:
MsgBox "An error has occurred. " & _
Err.Number & ": " & Err.Description _
, vbInformation + vbOKOnly, "An Error has occurred."
Debug.Print "ERROR OCCURED IN GenericProcedure..."
Debug.Print Err.Number & ": " & Err.Description
End Sub
Related examples in the same category