# Programmatically Access the Call Stack



## Oorang (May 9, 2007)

I know this can be done in .net using the mscorlib. And I see you can successfully set a referenc to the library using VBA if you have .net (reference the tlb) but it doesn't seem to be working quite properly. Has anyone pulled this off yet? MVPs? Gurus?


----------



## SydneyGeek (May 11, 2007)

I'm assuming that you have already used Ctrl + L to view the call stack in Debug mode?

Denis


----------



## Oorang (May 11, 2007)

Hi Syd,
Yup, but that window's information idoes not appear to be available at runtime.


----------



## SydneyGeek (May 11, 2007)

True, 

The source I read on it says that you can only get to the call stack window in Debug. Can I ask why you need to get the stack at runtime?

Denis


----------



## SydneyGeek (May 11, 2007)

Another quote: 

"VBA has the ability to display the call stack _when a procedure is paused at a breakpoint_". Access Developer's Handbook 2002, Desktop Edition. 

I wonder, does that mean that it's not accessible at other times?

But I found this... 
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarofftalk/html/office11012001.asp

...shows how to reference the mscorlib, once you have created a wrapper from .NET.

Denis


----------

