Solved

Call Stack

Posted on 2001-06-19
3
187 Views
Last Modified: 2010-05-02
Hi,

I was wondering if it is possible to reproduce the call stack information in a compiled binary as if you had pressed CTRL+L in devel.,

i.e.

private sub whatever()
  on error goto errHandler

  ...

errHandler:
  if err.number <> 0 then
    msgbox callStack
  endif
end sub

public function callStack() as string
  //gathers and returns a string containing the call stack
end function

Any ideas?

Thanx

PS I will adjust the points as necassary.
0
Comment
Question by:wolfjjj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6209300
i know that in  VB.net you will have this build-in, but in VB6- ?
listening & Learning
0
 
LVL 1

Accepted Solution

by:
morgan_peat earned 50 total points
ID: 6209575
We had this question not long ago.

The answer was something along the lines of:
Create your own 'stack' object (with push, pop, etc).  Each time you enter/leave a procedure, you 'push' the procedure name onto the stack, then 'pop' the name off again once you leave the procedure.  This'll keep track of where you are in the call stack.
Of course, you need to hard-code in each procedure name.
0
 
LVL 1

Author Comment

by:wolfjjj
ID: 6209586
It appears <= VB6 cant do what I've asked and morgan_peat has suggested a viable solution.

Thanx for you input.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 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