I have two separate class modules - and I'd like to have one of those modules as a property of the other module (so I can reference for example module1.module2.property2). I did something that appeared initially to work, until I tried to build a collection. I build a collection of instances of module1, however when I go to reference collection.item(1).module2.property2 - all I get is the last value I entered. Meaning, if I had 5 items in the collection, while all my module1 properties reference the values I entered for each of the 5, my module1.module2 properties reference only item(5).
Am I trying to do something which is simply not possible?
Here is how I built the class (probably incorrectly) - module1 is called CContact, module2 is CMission. In the CContact module I defined a property:
Private: m_mission as New CMission
with:
Property Get Mission() as CMission
set Mission = m_mission
End Property
Property Let Mission (ref as CMission)
set m_mission = ref
End Property
Can this be done? (am I breaking some cardinal rule of programming by even attempting this type of reference? - I'm not a programmer)