|
Subject:
|
Two tiered collections (user-defined)
|
|
Posted By:
|
sholom
|
Post Date:
|
11/26/2003 1:51:27 PM
|
I don’t know the proper forum for the questions below; please direct me to another site if this is not the proper place.
I have converted a database used by a professional society into a set of objects and collections. The ideal structure is “Collection A” has members A1, A2, A3, etc.; each member has several properties and methods; one of the properties is “Collection B,” which has members B1, B2, B3, etc., and each members has several properties and methods. This is like the structure of workbooks: the workbooks collection has members, each of which is a workbook; a workbook has various properties and methods; some of these properties are collections, such as worksheets and charts, and the worksheets collection (as well as the sheets collection and the charts collection) has members, each of which is a worksheet, with properties and methods of its own.
I’m not sure of the exact coding for creating this structure. I use the Excel 2002 VBA Programmers Guide as my reference, but that book does not have this two level structure explained. Can I define one of the properties as a collection, and will VBA pick up the collection which is characterized in a separate class module?
In addition, I would like to store the entire collection. I am presently storing all the data in several names in an Excel spreadsheet; this allows for more than 65,000 rows (one of the tables has 145,000 rows) and it provides extremely fast conversion into VBA variant arrays. But is there a way to store the data as a collection, so that I don’t have to convert the names into the objects each time I use the database?
|
|