Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 26th, 2003, 02:51 PM
Registered User
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Two tiered collections (user-defined)

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?





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 03:44 PM
User Control Not Defined? Ron Howerton Visual Studio 2005 1 March 29th, 2006 11:15 AM
User-defined type not defined (Icecream.mdb) dloren01 BOOK: Beginning Access VBA 0 June 22nd, 2005 10:36 PM
user defined templates clandestine XML 2 June 15th, 2005 08:27 AM
User Defined Function niravp SQL Server 2000 7 November 29th, 2004 02:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.