![]() |
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 |
All times are GMT +1. The time now is 09:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com