On Feb 29, 4:41 pm, "Jonathan West"
> "chadwick"
>
> news:9b2c8324-f85c-45de-8e15-f83f14638439@d4g2000prg.googlegroups.com...
>
> > Hello all,
> > Is it possible for a property of an object in VBA to itself be an
> > object? I'm working on a program that involves chemical equations,
> > and consequently I have defined a couple of useful classes:
> > "ChemicalCompound," and "ChemicalEquation." The ChemicalEquation
> > class has as one of its members an array of ChemicalCompound objects,
> > which represent the reactant compounds in the equation. I would like
> > to keep the actual array private (i.e. access restricted to the class)
> > and use a Property Get to access the ChemicalCompound objects in the
> > array. Is possible for the return value of a Property Get to be an
> > object of a user-defined class?
>
> Yes. The syntax you use is like this
>
> Property Get ReactantCompound(Index As Integer) As ChemicalCompound
>
> --
> Regards
> Jonathan West - Word MVPwww.intelligentdocuments.co.uk
> Please reply to the newsgroup
Thanks so much for the help! Sometimes it's the simplest things...