Click to See Complete Forum and Search --> : Using a Collection in a class
dbarr
Oct 31st, 2001, 03:49 PM
I want to be able to have a collection in an ActiveX EXE and have the parent add items to it. I cannot see the collection in the parent. Any suggestions?:confused: :confused: :confused:
Edneeis
Oct 31st, 2001, 04:29 PM
Is the collection a property of the main class or object you are working with?
dbarr
Nov 1st, 2001, 07:20 AM
I tried making the collection Public in the main Class but needed to put it in a module in order to compile.
Is the collection a property of the main class or object you are working with?
Edneeis
Nov 1st, 2001, 10:52 AM
Well this is how I would do it:
I would make the class that I want to have a collection of as a class module in my ActiveX Exe. Then I would use the Class Builder Utility that is in VB to make a collection of the class also in the ActiveX Exe. Then I would Make a property of the collection in my class that I want to work with. That will create a type of Heirarchy kind of. If you wanted to let the user make individual classes and then add them to the collection you could make it multiuse or if not you could use something like private or public not creatable. Here I'll included a small sample.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.