ActiveX DLL Interfaces and referencing collections

 I am building an object that has some public collections; this object fills these collections with other objects that are created during code execution in the parent object.
  I am having a problem in defining the interface for this object.  I can define the methods and properties in the interface but cannot define the collections.  The collections are dimmed in the declarations portion of the object's class module and then Set in the intialize event; "set colItems = new collection".
  When I declare the same collection in the interface I receive an error, if I don't declare it then I can't see it.  What am I doing wrong?
  Any examples or references to this problem would be greatly appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

<<I can't see it>>....
without getting into your concept - if all you want is to SEE it - add Module1 to your project and declare the Collection there.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
danhotbAuthor Commented:
I think I'm asking the question badly.

Let me ask it this way:


Option Explicit

public sub BuildPerson()

end sub


Option Explicit
Implements ITest

private sub ITest_BuildPerson()
   'At this point I would add other
   'objects, like CShoe, to a collection
   'but don't know how to reference this
   'collection from the interface.

end sub

i can't follow your architecture. perhaps it's because i don't know what you are after.
however, it seems to me that ActiveX DLL is NOT the proper tool to use here.
AvtiveX EXE is a REAL object, since its Out Of process.

anyway, if all your objects are created in the same project - my answer should enable you to access the collection from any point.
else  - reject my answer.

you say you creadted some process that enable interaction between your objects.
using them - you can alaways pass a reference to the collection.
more then that - you can obtain a reference to the collection inside EACH of its members doing this :
add in an object class, a module level collection object variable :
*public MyParent as Collection*
now, when you create an object you add it to a collection named *MyCol*.
right after that write :
*Set Objectname.MyParent=MyCol*

now, you have a reference to the collection from within any object inside it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.