![]() |
What is the best way of collectiong as much debug info as possible when users hit problems.
What is the best way to collect information about errors when my users
hit a problem so that I can solve them offline and remotely and let my users continue? I would really like more information than the Err object provides. Of course, Err.Number & Err.Description are useful but I would really need more information for proper debug such as the line of code that threw the error ,call stack and current context (i.e. ActiveSheet etc etc). Is this possible or is the Err object the limit of problem description? I figure if I could extract all this information I could have my error handler mail the dump to me and let the user continue. Does anyone have any ideas or web resources that discuss this issue? Cheers for any thoughts in advance. Chrisso |
What is the best way of collectiong as much debug info as possible when users hit problems.
Chrisso,
Get hold of Professional Excel Development by Stephen Bullen, Rob Bovey and John Green. It has an excellent chapter on centralised error management. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Chrisso" wrote in message oups.com... What is the best way to collect information about errors when my users hit a problem so that I can solve them offline and remotely and let my users continue? I would really like more information than the Err object provides. Of course, Err.Number & Err.Description are useful but I would really need more information for proper debug such as the line of code that threw the error ,call stack and current context (i.e. ActiveSheet etc etc). Is this possible or is the Err object the limit of problem description? I figure if I could extract all this information I could have my error handler mail the dump to me and let the user continue. Does anyone have any ideas or web resources that discuss this issue? Cheers for any thoughts in advance. Chrisso |
What is the best way of collectiong as much debug info as possible
I use a universal error handling function, e.g.
Function myErrorHandler(errno As Integer, errdescr as String, callingroutine as String, activesht as String, etc, etc) MsgBox errno & errdescr & callingroutine & activesht, etc This can then be called from handingling section of each routine, e.g. Sub myRoutine() On Error Goto Handler (code) Exit Sub Handler: myErrorHandler Err.Number, Err.Description, "myRoutine", ActiveSheet, ... End Sub If you want to be a bit more clever than just showing a message box, you could use the necessary automation code to bung it all into, say, an Outlook email to you so the user doesn't even see the error. "Chrisso" wrote: What is the best way to collect information about errors when my users hit a problem so that I can solve them offline and remotely and let my users continue? I would really like more information than the Err object provides. Of course, Err.Number & Err.Description are useful but I would really need more information for proper debug such as the line of code that threw the error ,call stack and current context (i.e. ActiveSheet etc etc). Is this possible or is the Err object the limit of problem description? I figure if I could extract all this information I could have my error handler mail the dump to me and let the user continue. Does anyone have any ideas or web resources that discuss this issue? Cheers for any thoughts in advance. Chrisso |
What is the best way of collectiong as much debug info as possible when users hit problems.
Also, whilst I see no mention of it in VBA help or the Object Browser, there
is the Erl function to return the line that errored. You of need to have all you code lines numbered for this return anything but 0. |
All times are GMT +1. The time now is 10:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com