Get The Call Stack or Current Module

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.
 
D

Dirk Goldgar

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.
 
M

MPM1100

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top