+ Reply to Thread
Results 1 to 2 of 2

Basic understanding of classes

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Basic understanding of classes

    Hi,

    I've gotten the following code from the cpearson website here http://www.cpearson.com/excel/classes.aspx but I'm not sure I'm following exactly. I've created the Class Module named CEmployee with the following code :

    Please Login or Register  to view this content.
    and in a new module I'm testing it :
    Please Login or Register  to view this content.
    It all works fine and dandy but I don't see how I can use this in my code. How and where can I use the class blueprint I've created to "remember" multiple instances of the class. I understand the GET the property is telling Name to be a string and the LET is writing over it in the class. Do I need to remove the LET property and make the class read only so that I can use it again ?

    Would the following pseudo code work for example, saying that there are strings in A1:A3:
    Please Login or Register  to view this content.
    Thanks,
    amphi

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Basic understanding of classes

    If you look further down the page you've linked to you'll see code that uses a collection to store multiple instances of CEmployee.

    Mind you, creating a further class, say CEmployees, might be another option though that would also use a collection.
    If posting code please use code tags, see here.

+ 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] VBA Classes For ADO
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-14-2015, 11:07 AM
  2. [SOLVED] Get how many classes I've taken so far.
    By vbmark in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-20-2014, 11:15 AM
  3. T-value for different classes
    By dr.cuco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-14-2013, 07:16 PM
  4. Replies: 5
    Last Post: 11-04-2013, 11:28 AM
  5. Understanding and Creating Classes
    By Jacques Grobler in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2011, 09:41 AM
  6. Classes
    By blatham in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2008, 05:47 PM
  7. Classes containing Classes
    By Adam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2006, 02:50 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