LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Best tutorial for building base/collection classes?


Te way you describe what you are trying to do leaves me a little
confused. In this circumstance I would normally do the following.

1. Create a class object to store the data about one person. Use Insert
ClassModule and name it eg clsMyPerson .
In the class module you need to create properties for each piece of
data (name, start date, etc) Use Insert ... Procedure ... Property

and variables in the Class Module to store the data

eg code in class module

Option Explicit

Dim sName As String

Public Property Get Name() As String
Name = sName
End Property

Public Property Let Name(ByVal sNewName As String)
sName = sNewName
End Property


Then in your loop (having declared a Dim ClsPerson as clsMyPerson)

set clsperson = new clsmyperson

populate the values

clsperson.name= namestringvalue

Then once populated just add it to a collection object. Although I
would normally keep the collection object in a class object of it's
own. As it makes it more manageable.

regards


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=548017

 
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
Excel Classes alish Excel Discussion (Misc queries) 3 October 30th 07 01:03 PM
Change base 6 to base 10? Brian Clarke Excel Discussion (Misc queries) 4 May 9th 06 02:24 PM
Classes containing Classes Adam[_15_] Excel Programming 2 April 1st 06 07:47 AM
Using Classes in .xla oli Excel Programming 2 June 3rd 05 11:37 AM
tutorial for building charts? Giovanni Excel Discussion (Misc queries) 2 April 22nd 05 03:58 PM


All times are GMT +1. The time now is 09:11 PM.

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

About Us

"It's about Microsoft Excel"