-
now this may be a stupid question, but how do you make the errobj.description, and errobj.source recieving a error message, then pipe it to another subroutine. You just pipe it through the declarations for subroutines and functions right?? private function WackyFunc(errobj) ???
how do I get it to recieve the value?
sorry for the dumb question,
Thanks
[email protected]
-
<?>
Code:
'here is an example but I give it an error number
'just for demo purposes.
'if this were in your errorhandler then
'it would do it's own stuff and you wouldn't be
'hardcoding the number in
'get error source and description
Private Sub Command1_Click()
Dim Msg$
' If an error occurs, construct an error message
'hardcode the error number for test purpose
Err.Number = 20520
If Err.Number <> 0 Then
'uses msgbox for display you can code it to go where you want and do what you want
Msg$ = "Error # " & Err.Number & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg$
End If
End Sub