R
Robert Mulroney
I have implemented a class in VBA and I'm storing multiple instances of the
class in a collection. I would now like to sort the objects in the collection
based on one of the class properties. Which property we sort by will be
determined at run-time.
I've written a procedure that can sort items in a collection but it relies
on using binary operators (>, <, =, ect) to rate one collection item against
the next. That's all fine if you're only storing primitive types in the
collection, I have a homogeneous collection of objects how can I compare one
to the next?
I have seen people implement an "=" method for a class in C#.net (no I can't
remember how they did it), but can you do anything like that in VBA.
- Rm
class in a collection. I would now like to sort the objects in the collection
based on one of the class properties. Which property we sort by will be
determined at run-time.
I've written a procedure that can sort items in a collection but it relies
on using binary operators (>, <, =, ect) to rate one collection item against
the next. That's all fine if you're only storing primitive types in the
collection, I have a homogeneous collection of objects how can I compare one
to the next?
I have seen people implement an "=" method for a class in C#.net (no I can't
remember how they did it), but can you do anything like that in VBA.
- Rm