Get The Call Stack or Current Module

  • Thread starter Thread starter MPM1100
  • Start date Start date
M

MPM1100

Hello All,

I'm wondering if there is a solution to accessing the call stack when an
error occurs, or at the minimum determine the module where the error resulted.

Any help is always appreciated.
 
MPM1100 said:
Hello All,

I'm wondering if there is a solution to accessing the call stack when an
error occurs, or at the minimum determine the module where the error
resulted.


Aside from CodeContextObject, which will give you the name of the object
from which the code is being executed, there's nothing built-in, and the
information is hard to get at. You can implement your own call stack in
code. You can use the free MZTools add-in ( http://www.mztools.com ) to
insert boilerplate code in every procedure, which can include the procedure
name. And there's a cool new add-in from EverythingAccess, the "SimplyVBA
Global Error-Handler" (
http://www.everythingaccess.com/simplyvba-global-error-handler.htm ), that
does seem to provide detailed information, though it is not free.
 
Thanks for your help and input.

I did see the Everything Access site, but didn't want to pay for anything
that I could possibly program myself. Guess I might have to after all...

Cheers!
 
Back
Top