[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Call Stack

Posted on 2005-03-20
2
Medium Priority
?
646 Views
Last Modified: 2009-12-16
Is there a way to access the VB call stack at run-time. Basically I want a procedure to be able to determine the name of the procedure that called it
0
Comment
Question by:bisonfur37
2 Comments
 
LVL 19

Accepted Solution

by:
Shauli earned 1000 total points
ID: 13587233
I dont think there is a way to simply access call stack after compiling. A simple way (however, dirty) would be to hard code the procedure name. For example, if you need it for error traping then you can do:

Public Sub...

...
Exit sub

myErrorHandling:
MsgBox Err. Number & "[" & Err.Description & "]" has occured in yourprocedurenamehere"
...
End Sub

S
0
 
LVL 2

Author Comment

by:bisonfur37
ID: 13587633
I think I answered my own question after some research...  

As Shauli said, there is no easy way to access the callstack at runtime.  Dan Fergus offers a workaround using dgbhelp.dll in his article Get Debug Info From Production App -- http://www.ftponline.com/vsm/2002_05/magazine/columns/blackbelt/default_pf.aspx (requires registration).

Shauli, I'll reward you the points
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question