PC Review


Reply
Thread Tools Rate Thread

Call Stack Available ?

 
 
Neal Zimm
Guest
Posts: n/a
 
      10th Mar 2010
When browsing the Locals Window, I happened upon the call stack display.

I looked in Help but could not find a way to access it with VBA.
It might be handy in error processing in knowing how you got somewhere.

If it's available, how do you access it?
Thanks.
--
Neal Z
 
Reply With Quote
 
 
 
 
Charles Williams
Guest
Posts: n/a
 
      10th Mar 2010
There is no way of accessing the call stack from VBA.

For widely distributed addins I maintain my own global VBA stack array
by adding the name of the function/sub into an array at the start and
subtracting it at the end. Then the error handling can display where
the error has occurred.
I also use line numbers and ERL to display the line the error occurred
on.

regards
Charles

>When browsing the Locals Window, I happened upon the call stack display.
>
>I looked in Help but could not find a way to access it with VBA.
>It might be handy in error processing in knowing how you got somewhere.
>
>If it's available, how do you access it?
>Thanks.

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      11th Mar 2010
I maintain a stack array too, I am glad to see that I am not the only
oddball. I even call my routines PushProcedureStack and PopProcedureStack

Bob

"Charles Williams" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> There is no way of accessing the call stack from VBA.
>
> For widely distributed addins I maintain my own global VBA stack array
> by adding the name of the function/sub into an array at the start and
> subtracting it at the end. Then the error handling can display where
> the error has occurred.
> I also use line numbers and ERL to display the line the error occurred
> on.
>
> regards
> Charles
>
>>When browsing the Locals Window, I happened upon the call stack display.
>>
>>I looked in Help but could not find a way to access it with VBA.
>>It might be handy in error processing in knowing how you got somewhere.
>>
>>If it's available, how do you access it?
>>Thanks.



 
Reply With Quote
 
Neal Zimm
Guest
Posts: n/a
 
      11th Mar 2010
Thanks Charles,
I was afraid of that. I was thinking about the method you mentioned.

I'm not clear on "scope" issues with addins re: global public variables.

I have an addin which opens by reference when the user's wbk is opened.

There are LOTS of public vars in the addin(all have constants or the
values are not changed) by the user.

What happens when 2+ users at the same time use your array? I've read you
have to be careful with globals when there is > 1 user.

Thanks.


--
Neal Z


"Charles Williams" wrote:

> There is no way of accessing the call stack from VBA.
>
> For widely distributed addins I maintain my own global VBA stack array
> by adding the name of the function/sub into an array at the start and
> subtracting it at the end. Then the error handling can display where
> the error has occurred.
> I also use line numbers and ERL to display the line the error occurred
> on.
>
> regards
> Charles
>
> >When browsing the Locals Window, I happened upon the call stack display.
> >
> >I looked in Help but could not find a way to access it with VBA.
> >It might be handy in error processing in knowing how you got somewhere.
> >
> >If it's available, how do you access it?
> >Thanks.

> .
>

 
Reply With Quote
 
Neal Zimm
Guest
Posts: n/a
 
      11th Mar 2010
Hi Bob, Thanks for the post.
We emailed each other some time ago, I'm the guy who's working on a
newspaper App. (Still working on it, had to take some time off to earn some
money) and I've not forgotten about you.

You gave me your email address. What's the best to contact you if your
email has changed? thanks. (It was about a year ago ?)
--
Neal Z


"Bob Phillips" wrote:

> I maintain a stack array too, I am glad to see that I am not the only
> oddball. I even call my routines PushProcedureStack and PopProcedureStack
>
> Bob
>
> "Charles Williams" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > There is no way of accessing the call stack from VBA.
> >
> > For widely distributed addins I maintain my own global VBA stack array
> > by adding the name of the function/sub into an array at the start and
> > subtracting it at the end. Then the error handling can display where
> > the error has occurred.
> > I also use line numbers and ERL to display the line the error occurred
> > on.
> >
> > regards
> > Charles
> >
> >>When browsing the Locals Window, I happened upon the call stack display.
> >>
> >>I looked in Help but could not find a way to access it with VBA.
> >>It might be handy in error processing in knowing how you got somewhere.
> >>
> >>If it's available, how do you access it?
> >>Thanks.

>
>
> .
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      11th Mar 2010
Hi Neal,

Which email do you have for me (please obfuscate it, don't publish it so
that it can be sniffed out)?

--

HTH

Bob

"Neal Zimm" <(E-Mail Removed)> wrote in message
news:4031C61C-2D7B-484D-8333-(E-Mail Removed)...
> Hi Bob, Thanks for the post.
> We emailed each other some time ago, I'm the guy who's working on a
> newspaper App. (Still working on it, had to take some time off to earn
> some
> money) and I've not forgotten about you.
>
> You gave me your email address. What's the best to contact you if your
> email has changed? thanks. (It was about a year ago ?)
> --
> Neal Z
>
>
> "Bob Phillips" wrote:
>
>> I maintain a stack array too, I am glad to see that I am not the only
>> oddball. I even call my routines PushProcedureStack and PopProcedureStack
>>
>>
>> Bob
>>
>> "Charles Williams" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > There is no way of accessing the call stack from VBA.
>> >
>> > For widely distributed addins I maintain my own global VBA stack array
>> > by adding the name of the function/sub into an array at the start and
>> > subtracting it at the end. Then the error handling can display where
>> > the error has occurred.
>> > I also use line numbers and ERL to display the line the error occurred
>> > on.
>> >
>> > regards
>> > Charles
>> >
>> >>When browsing the Locals Window, I happened upon the call stack
>> >>display.
>> >>
>> >>I looked in Help but could not find a way to access it with VBA.
>> >>It might be handy in error processing in knowing how you got somewhere.
>> >>
>> >>If it's available, how do you access it?
>> >>Thanks.

>>
>>
>> .
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call Stack Lou Microsoft VB .NET 2 7th Jun 2007 01:17 AM
Warning 1684 CA2214 : Microsoft.Usage : 'RandomShade..ctor(Int32, Int32, Int32, Int32, Int32)' contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences: steve bull Microsoft C# .NET 4 7th Jul 2005 05:54 PM
walking the call stack from within a thread. Getting the parent call stack Jason Coyne Microsoft C# .NET 1 30th Mar 2005 10:30 PM
Re: Call Stack Jon Skeet [C# MVP] Microsoft Dot NET 0 17th Jun 2004 05:10 PM
Call Stack Jim Heavey Microsoft C# .NET 3 29th Jan 2004 03:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 PM.