Good Morning Folks,
I have created a custom collection which enables me to get at one of the items in the collection
but the code that i use is not as straightforward as worksheets(1) or worksheets("name")
my code requires writing, Floors.Floor(1). I would prefer writing my custom collection class that results in Floors(1) or Floors("name"). Code seems more understandable.
if you can see how to do that, instead of giving me the answer right away, please offer a hint
that gives me something to think with so that maybe i might be able to derive the solution you would have provided me. I will probably better remember the solution that way.
here is the code i have written so far that gets me at least Floors.Floor(1)
VBA executes the above by getting the collection, Floors![]()
With aHouse.Floors For i = 1 To .Count MsgBox "aHouse.Floors(" & i & ").Name = " & .Floor(i).Name Next End With
then executes a Floor Collection property of get Floor
![]()
Public Property Get Floor(ByVal value As Variant) As Floor_Class Set Floor = GFloorCollection(value) End Property
Bookmarks