I am trying to create an error log in VBA for capturing details of errors in code. (See: http://www.excelforum.com/excel-prog...-file-txt.html ) However I am running into a problem with capturing the name of the procedure where the error was triggered.
I think I need a .COM add-in that I could run on a VBA project and have it loop through all the procedures in the project and add a single line of code to each - a constant which records the name of that procedure. (The idea being that when the error log prints, it will record the name of the last run constant - thus capturing the procedure name that had the error).
To make it more difficult, I often like to change a procedure name months/years later - so the add-in would need to have the ability to recognise the constant procedure names it has already created and remove them (so I can reapply straight afterwards).
Bookmarks