andreas_rafn
asked on
How to catch events of objects in a collection in VBA?
I have defined an class - lets call it SomeClass - with a range of different events.
In order to create a functionality for storing and handling batches of these classes, I have also created a collection class - lets call it SomeClassCollection. Within this the SomeClass objects are stored in a collection.
I would really like to be able to catch the events of individual SomeClass objects in the collection. And let the SomeClassCollection object act accordingly (e.g. by raising its own event). Is this in any way possible?
In order to create a functionality for storing and handling batches of these classes, I have also created a collection class - lets call it SomeClassCollection. Within this the SomeClass objects are stored in a collection.
I would really like to be able to catch the events of individual SomeClass objects in the collection. And let the SomeClassCollection object act accordingly (e.g. by raising its own event). Is this in any way possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you pass an object ByVal you only pass a copy of the pointer, not a copy of the object, so I'm not sure how that would affect performance but using ByRef should work.
ASKER
Open in new window