TheSwamp
Code Red => VB(A) => Topic started by: David Hall on October 15, 2007, 03:08:52 PM
-
I have never tried this, nor do I know where to begin, but here goes. Is there a way to tie an Unhandled Error to an email so that when a user breaks something (read finds an error I didn't account for) I can get an email telling me which module, and which line?
-
Maybe this will be of some help??
http://www.theswamp.org/index.php?topic=12796.0
-
Duh,
I did this a few years ago. Doubt I still have it although it's possible but I will rework it if needed. I think I referenced the Outlook library for the emailing part, used err.Source for the file name, set a string to the sub name at the beginning of the sub, and I think I just had the error, not the line it occurred on. Not sure how to get that but will look into it when I have some time.
-
MattW's answer > mine
-
If your office is like mine you might have a hard time getting the email to be sent automatically (if the IT twits have restrictions in place to guard against that type of thing). An alternative is to log the error, program name, module, user, time, etc... to a log file on the network somewhere - a location that everyone has read/write access to of course. Or maybe individual logs with the user's name as the filename to easily keep track of who's breaking what??!?
-
hadnt thought of that, might give that a try