Calling Proc in error handler

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I'm trying to get Allen Browne's LogError() function working in my error
handlers. I was using one of my own, but it didn't log the errors just
handled them and displayed feedback to the user.

The thing is, there's 330+ instances of the error handler in my vba project,
and I don't relish having to go into every instance and type in the name of
the calling proc for every sub.

Is there any other way to do it?

In a related question, I don't understand the use of the select case in the
function itself. Why is there a 'Case 0' and a Case 2501 in the function?
Is it because those two error numbers don't/won't work like the rest of them
in the function?

Thanks for any feedback,
CW
 
Error 0 means there is no error.
Error 2501 means the action was canceled. This error will occur when you
open a report and there was no data for the report. Typically, you use the
No Data event i the report to tell the user there is nothing to report and
ignore the 2501 error that occurs in this case. It happens because 2501
means an action was canceled. That is what happens when you cancel the
report in the No Data event.
 
Thanks a lot for the info, Dave.

CW

Klatuu said:
Error 0 means there is no error.
Error 2501 means the action was canceled. This error will occur when you
open a report and there was no data for the report. Typically, you use the
No Data event i the report to tell the user there is nothing to report and
ignore the 2501 error that occurs in this case. It happens because 2501
means an action was canceled. That is what happens when you cancel the
report in the No Data event.
 
Back
Top