ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Push Down Stack ? (https://www.excelbanter.com/excel-discussion-misc-queries/238039-push-down-stack.html)

dhstein

Push Down Stack ?
 
Does VBA have a "push down/ pop up " stack ? Thanks for any help on this.



JLatham

Push Down Stack ?
 
Not like you're thinking about; that is not one that you can "push" and "pop"
from as in assembly language. It does have internal stack space that the VB
engine uses, but you can't access that directly.

You could probably simulate a stack with a dynamic (or even static) array.
If you'd explain a little more about what you are trying to do or want to do,
then we might be able to offer some better suggestions.

"dhstein" wrote:

Does VBA have a "push down/ pop up " stack ? Thanks for any help on this.



dhstein

Push Down Stack ?
 
Thanks. I'll probably just simulate it - keep track of the level of the
stack with a pointer and push and pop accordingly. I'm showing a progress
meter for several applications. The applications can be called directly or
can be called from an application that is already showing the progress meter
- so I need to keep track of which application's progress is being displayed
and the percent complete and I thought a push and pop type of stack would
work well.

David


"JLatham" wrote:

Not like you're thinking about; that is not one that you can "push" and "pop"
from as in assembly language. It does have internal stack space that the VB
engine uses, but you can't access that directly.

You could probably simulate a stack with a dynamic (or even static) array.
If you'd explain a little more about what you are trying to do or want to do,
then we might be able to offer some better suggestions.

"dhstein" wrote:

Does VBA have a "push down/ pop up " stack ? Thanks for any help on this.



JLatham

Push Down Stack ?
 
Sounds like you have a handle on it all.

"dhstein" wrote:

Thanks. I'll probably just simulate it - keep track of the level of the
stack with a pointer and push and pop accordingly. I'm showing a progress
meter for several applications. The applications can be called directly or
can be called from an application that is already showing the progress meter
- so I need to keep track of which application's progress is being displayed
and the percent complete and I thought a push and pop type of stack would
work well.

David


"JLatham" wrote:

Not like you're thinking about; that is not one that you can "push" and "pop"
from as in assembly language. It does have internal stack space that the VB
engine uses, but you can't access that directly.

You could probably simulate a stack with a dynamic (or even static) array.
If you'd explain a little more about what you are trying to do or want to do,
then we might be able to offer some better suggestions.

"dhstein" wrote:

Does VBA have a "push down/ pop up " stack ? Thanks for any help on this.




All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com