+ Reply to Thread
Results 1 to 2 of 2

Adding objects as a property of cells/range

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Question Adding objects as a property of cells/range

    Hi Guys,

    Is there a way that I can store my custom class objects into a hidden attribute of the range class such that I can recall them for use at anytime? perhaps (/not) even after the workbook is closed?

    I.e. for each cell in my workbook, can I store a custom object/ collection of custom objects in the cell.

    to achieve this would I potentially have to create a new property of the range class (is this possible to do so) or is there perhaps a property/ collection/ etc that already exists that I could simply use for this?

    Note, I say I want to store an object to the range class, in fact i may want to store a collection of objects, and even multiple collections to this range. I am just testing the water at this stage to see what information you guys can supply me with.

    I would rather use the individual cells to hold the objects, rather than a global collection to hold all the objects. Obvious reasons for this are for recalling purposes. i.e. if i was wanting to retrieve a property from the object that relates to the active cell, I would rather not loop through some global collection of all the objects.

    Kind Regards
    Jordan
    Last edited by jordan2322; 09-11-2013 at 12:29 AM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding objects as a property of cells/range

    no you can't. the closest thing I can think of to what you describe would be simply storing the data in a sheet and reading it back into the objects when the workbook opens (or at whatever point you need) or serializing it in some way for storage
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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. Understanding Cells property vs. Offset property (implicit vs explicit references)
    By Wedge120 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-26-2010, 10:38 PM
  2. How do you select a range of cells on another worksheet using the Cells property?
    By iterature in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-20-2007, 10:45 AM
  3. Objects with .type property
    By atpgroups in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2006, 07:05 AM
  4. [SOLVED] How to use Cells property to Range object?
    By deko in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2005, 04:06 PM
  5. Using Select with Range.Cells property
    By Ralph Heidecke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2005, 12:38 PM

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