Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


--
Dolemite
------------------------------------------------------------------------
Dolemite's Profile: http://www.excelforum.com/member.php...o&userid=26136
View this thread: http://www.excelforum.com/showthread...hreadid=501252

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default class/struct functionality in VBA?

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

--
Regards,
Tom Ogilvy


"Dolemite" wrote in
message ...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default class/struct functionality in VBA?


Thank you very much...I will check that out and see what I can do.


--
Dolemite
------------------------------------------------------------------------
Dolemite's Profile: http://www.excelforum.com/member.php...o&userid=26136
View this thread: http://www.excelforum.com/showthread...hreadid=501252

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it bug or functionality? Surinder Singh Excel Discussion (Misc queries) 6 February 9th 09 01:28 PM
Odd functionality Amber Excel Worksheet Functions 4 July 10th 07 10:12 PM
Go to functionality [email protected] Excel Worksheet Functions 0 November 7th 06 10:08 PM
Emulate C/C++ struct in VBA? No Name Excel Programming 8 January 8th 04 08:24 PM
RaiseEvent from a class contained in a 2nd class collection? Andrew[_16_] Excel Programming 2 January 6th 04 04:22 PM


All times are GMT +1. The time now is 02:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"