Creating an error script

thatlem

Registered User.
Local time
Today, 15:54
Joined
Jan 29, 2009
Messages
115
I need some recommendations on the best way to write an error scipt in the code. Basically, I want to prevent the "canned" MS error message that includes the debugging, etc.

For example, if someone starts to run a report by date range and then cancels before all the parameters are met - triggering an error, I just want the system not to flash an error - or allow me to enter an error text message. The first is preferrable.

I don't want to run the risk someone will press "debug" and screw things up!!!

Also, do I include the script within the Private sub, or create a new and redirect?

Thanks
 
can't get to the site you indicated. Can you copy and paste some information instead?
 
First of all, I would suggest using Allen Browne's error handling code:

http://allenbrowne.com/ser-23b.html

For this to work properly you will have to add a few lines of code to EVERY procedure. It will be worth the work.

Allen's code will log every error that happens behind the scenes in a table, and you can optionally hide/display the error message from the user.

Second, I would recommend that your users work with an MDE. This way they don't even have the option or the ability to go into the VBA editor.

Evan
 

Users who are viewing this thread

Back
Top Bottom