Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2005-04-21
2
Medium Priority
?
182 Views
Last Modified: 2010-05-02
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

0
Comment
Question by:AlphaSquared
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 13838301
Try something like this:

    Trades(1).Details(1).Exits(1).Used = True
0
 

Author Comment

by:AlphaSquared
ID: 13838612
Idle Mind -- Excellent, many thanks.  A
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question