View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Neal Zimm Neal Zimm is offline
external usenet poster
 
Posts: 345
Default Call Stack Available ?

Thanks Charles,
I was afraid of that. I was thinking about the method you mentioned.

I'm not clear on "scope" issues with addins 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.

.