Would it be possible to see the CallStack
in VBA for MS Access 2003? That is to say, would it be possible to see from what procedure
or function
another function
was called?
View the Call Stack To view the call stack, open DevTools Sources panel and on the right panel, expand the Call Stack panel to see all the current functions in the call stack.
To display the call stack window you must first start your code in debug mode. Either start your application using the Step Into command or use a breakpoint to halt execution. You can then show the window by opening the "Debug" menu, expanding its "Windows" submenu and selecting "Call Stack".
The method-call stack (sometimes referred to as the program-execution stack) is a data structure that works behind the scenes to support the method call/return mechanism. It also supports the creation, maintenance and destruction of each called method's local variables.
The number of levels of calling functions used to differentiate between call sites is called the call stack depth. The call stack depth used in the analysis can be varied to suit your application. By default Freja uses a call stack depth of 1, that is, only the innermost calling function is considered in the analysis.
Yes it's possible, BUT it's not quite usefull!
Private Declare Sub SetMode Lib "vba332.dll" Alias "EbSetMode" (ByVal lngMode As Long)
Private Declare Function GetCallStackCount Lib "vba332.dll" Alias "EbGetCallstackCount" (lngCount As Long) As Long
Private Declare Function GetCallStackFunction Lib "vba332.dll" Alias "EbGetCallstackFunction" (ByVal Lvl As Long, ByRef strBase As String, ByRef strModule As String, ByRef strFunction As String, ByRef Done As Long) As Long
Before use GetCallStackCount and GetCallStackFunction call SetMode(2), and after SetMode(1).
At runtime, View menu -> Call Stack (or press CTRL + L).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With