-2

How to store objects in stack in vba?

Thanks for your answer.

Regards, Balu.

1 Answers1

1

You can implement a stack in VBA by using a collection.

You would write simple functions to implement push and pop. Push would add the argument to the collection. Pop would return the .count Item of the collection and then remove the .count item.

freeflow
  • 4,129
  • 3
  • 10
  • 18
  • Thanks for your reply. I stored multiple shapes in collection in powerpoint vba. But when I delete those shapes, the collection is empty. – Balasubramanian Seshadri May 26 '19 at 15:11
  • what I am trying to do is, I want to store the shape properties (eg., height, width etc.,) in variables, to use for other shapes. I don't want to define variable for each of shape's properties). I want to store the shape itself, as an single object, so that I can get, any of its properties for further reference. It should be stored in stack. – Balasubramanian Seshadri May 26 '19 at 15:14