+ Reply to Thread
Results 1 to 2 of 2

Collection of Class Modules

  1. #1
    Registered User
    Join Date
    07-10-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    20

    Collection of Class Modules

    Hi all.

    I am trying to create a collection of class modules. (Originally, I wanted to have a collection of user defined types. But after hours of head banging realized VBA doesn't let you do that)

    I think that the problem I am having has to do with the fact that the class i want to add to the collection has two class module's in it. [ See Below ]


    Please Login or Register  to view this content.
    Note: cAlpha and cBeta are each Class Modules that I created.


    One question, do I need to call New on cAlpha and cBeta members?

    Please Login or Register  to view this content.

    Because right now I do:

    Please Login or Register  to view this content.
    Now, I would LIKE to do the following:

    Please Login or Register  to view this content.
    The error is as follows:

    Run-time error '91':

    Object variable or With block variable not set


    BUT WHERE?


    Thanks to anyone that can help!
    Last edited by wildjester; 07-15-2009 at 12:53 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,490

    Re: Collection of Class Modules

    This is how I go about doing collections of classes.

    CAlpha
    Please Login or Register  to view this content.
    CBeta
    Please Login or Register  to view this content.
    CMaster
    Please Login or Register  to view this content.
    CMasters
    Please Login or Register  to view this content.
    Test module to demostrate uses
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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