R
RyanH
How can I return the Module Location and Sub Procedure of an error when an
error occurs?
Public Sub ProcedureName()
On Error GoTo ErrorHandler
' my code here
Exit Sub
'********************************
ErrorHandler:
Call ErrorHandler(ModuleName, ProcedureName, Err.Number, Err.Description)
End Sub
Public Sub ErrorHandler(ModuleName As String, ProcedureName As String,
ErrNumber As Integer, Description As String)
' show a msgbox with error information
End Sub
error occurs?
Public Sub ProcedureName()
On Error GoTo ErrorHandler
' my code here
Exit Sub
'********************************
ErrorHandler:
Call ErrorHandler(ModuleName, ProcedureName, Err.Number, Err.Description)
End Sub
Public Sub ErrorHandler(ModuleName As String, ProcedureName As String,
ErrNumber As Integer, Description As String)
' show a msgbox with error information
End Sub