+ Reply to Thread
Results 1 to 2 of 2

Add or update collection based on class property.

  1. #1
    Registered User
    Join Date
    07-26-2010
    Location
    NL
    MS-Off Ver
    Excel 2016
    Posts
    74

    Add or update collection based on class property.

    Hi,

    I have got a Collection filled with all different entries of a class (clsOG).
    I would like to check if a certain class property (g.name) is already present in the collection. If so i only want to update the class, if not add the class to the collection.

    Please Login or Register  to view this content.
    With the code shown above, all entries are added to the collection, I want to end up only with the collection of discticnt 'g.names' with the correct counts.

    Can anyone point me in the right direction?

    TIA

    ABBOV.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Add or update collection based on class property.

    You'd do something like this:

    Please Login or Register  to view this content.
    Rory

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Can't Assign to Read-Only Property; Compile Error on Assigning Property to Class.
    By Dal123 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-15-2018, 08:09 AM
  2. instantiate class A in a property of class B
    By bsapaka in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2014, 06:12 PM
  3. [SOLVED] Hide columns based on cell value - Unable to set hidden range property of Range Class
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-13-2012, 11:13 PM
  4. Class and one property is also a class or collection
    By gosa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2011, 05:31 PM
  5. Collection of Class Modules
    By wildjester in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2009, 09:26 AM
  6. Class with property as collection of another class
    By MCCCLXXXV in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-26-2008, 04:35 PM
  7. [SOLVED] Using a collection as a property
    By cantonarv in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-10-2005, 01:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1