Run-time error... Object doesn't support this property or method

I have the following hierachy of objects and collections:

Object                           Type
-----------------------------------------------------
Trades                          Collection      
  Trade                         Object
    Details                       Collection created on initialization of object "Trade"
      Detail01                  One of several objects initialized on initialization of object "Trade"
        Exits                     Collection created on initialization of object "Detail01"
          Exit01                 One of several objects initialized and added to Exits on initialization of "TradeDetail"
            Used                 Boolean property of object "Exit"

In a seperate module I do the following:

   Dim Trades As New Collection
   Dim Entry  As New Trade
   Trades.Add Item:=Entry  

I want to set the ....Exit01.Used property.  The following doesn't work

  Trades.Entry.Details.Detail01.Exits.Exit.Used = True

Please advise  

A

AlphaSquaredAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Try something like this:

    Trades(1).Details(1).Exits(1).Used = True
0
 
AlphaSquaredAuthor Commented:
Idle Mind -- Excellent, many thanks.  A
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.