+ Reply to Thread
Results 1 to 3 of 3

class/struct functionality in VBA?

  1. #1
    Registered User
    Join Date
    08-10-2005
    Posts
    18

    Question class/struct functionality in VBA?

    it has been a while so I will apologize for my terminology...

    I remember in C++, you had the ability to create classes and/or structures that encapsulated data about one particular thing.
    Eg. if I have a variable named house, then defined within that were different "categories" such as appliances, rooms, etc.. And to access appliances you would do something along the lines of
    house.appliances = 5
    or you could setup appliances like an array:
    house.appliances(1) = dishwasher
    house.appliances(2) = fridge

    Is there something along these lines in VBA that I can use? Arrays could suffice but would rather not. I have quite a few classifications/catgories and am trying to keep the code form getting too hairy with indexes. I apologize if I am not making this clear enough. Any help would be greatly appreciated! Thanks

  2. #2
    Tom Ogilvy
    Guest

    Re: class/struct functionality in VBA?

    http://www.microsoft.com/technet/pro...art2/ch09.mspx

    --
    Regards,
    Tom Ogilvy


    "Dolemite" <[email protected]> wrote in
    message news:[email protected]...
    >
    > it has been a while so I will apologize for my terminology...
    >
    > I remember in C++, you had the ability to create classes and/or
    > structures that encapsulated data about one particular thing.
    > Eg. if I have a variable named house, then defined within that were
    > different "categories" such as appliances, rooms, etc.. And to access
    > appliances you would do something along the lines of
    > house.appliances = 5
    > or you could setup appliances like an array:
    > house.appliances(1) = dishwasher
    > house.appliances(2) = fridge
    >
    > Is there something along these lines in VBA that I can use? Arrays
    > could suffice but would rather not. I have quite a few
    > classifications/catgories and am trying to keep the code form getting
    > too hairy with indexes. I apologize if I am not making this clear
    > enough. Any help would be greatly appreciated! Thanks
    >
    >
    > --
    > Dolemite
    > ------------------------------------------------------------------------
    > Dolemite's Profile:

    http://www.excelforum.com/member.php...o&userid=26136
    > View this thread: http://www.excelforum.com/showthread...hreadid=501252
    >




  3. #3
    Registered User
    Join Date
    08-10-2005
    Posts
    18
    Thank you very much...I will check that out and see what I can do.

+ 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