+ Reply to Thread
Results 1 to 2 of 2

Class Object Within a Class Object

  1. #1
    Registered User
    Join Date
    11-09-2014
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    1

    Class Object Within a Class Object

    Hello,

    I am trying to send and object I created into another object as one of its parameters so I can later access it.

    Ex:Show in message box: Parts(0).Batch(0).Value

    - I started by creating a new batch object.
    - I then create a new part object and send a String and Object to it.

    If you copy paste the code into VBA and step through it everything seems to work fine unti it gets to:

    Please Login or Register  to view this content.
    I get Error: Run-time error '91': Object Variable or With block variable not set

    Any ideas why?

    My Main Module:
    Please Login or Register  to view this content.
    cPart Class
    Please Login or Register  to view this content.
    cBatch Class
    Please Login or Register  to view this content.
    Last edited by wordizlife; 11-09-2014 at 05:28 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Class Object Within a Class Object

    You need to use Set with objects:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

+ 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] How to set class object properties
    By Tsjallie in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-18-2014, 02:58 PM
  2. Create Object (Class)
    By lampis in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-22-2012, 11:57 AM
  3. VB class/object library
    By hojkoff in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2011, 06:00 PM
  4. Class Object Setting
    By gabch in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2006, 06:32 AM
  5. [SOLVED] Object class in Excel VBA
    By Tom Chau in forum Excel General
    Replies: 1
    Last Post: 06-29-2006, 06:29 AM

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