Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: General VBA/VB6 : Abstract Data Types
Description: Abstract Data Types such as bit arrays, dictionary, history lists, queues, and stacks

Class: CDictionary

This class demonstrates using the dictionary object

Visual Basic 6 includes the Windows Scripting Host runtime component. This dynamic link library adds the ability to create and use Dictionary objects, which are similar to VB Collections, but are more powerful and can also be used in VBA. Unfortunately, several things are lacking in the dictionary object, and the documentation provide with VB 6 for this new object is thin at best. This class accomplishes three things: 1. Works around the bugs in the version of the Windows Scripting Runtime that ships with VB 6 2. Provides detailed examples of how to use the dictionary object. 3. Provides additional functionality such as sorting the dictionary.

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CDictionary class
CompareMode Property Sets the the CompareMode property. This property is used by the Exists method to find keys in the dictionary. Use Binary mode to do exact comparison. Use Text mode to case-insensitive comparisons.
Count Property Gets the count of objects in the dictionary
Dictionary Property Gets handle the current dictionary object. Use this object if you want direct access to the dictionary object.
Item Property Gets the item in the dictionary with the specified key.
Items Property Returns the Dictionary items as an array
Key Property Gets the key in the dictionary with the specified key
Keys Property Returns the Dictionary keys as an array
Add Method Adds the specified item to the Dictionary.
Class_Initialize Initialize Set initial values to defaults which may be overridden with property settings
DoSort Private Sorts the passed variant array
Exists Method Determines if the specified item exists in the dictionary. Comparison is done according to the setting of the CompareMode property.
Remove Method Removes the specified item from the Dictionary. A runtime error occurs if the specified item does not exist.
RemoveAll Method Removes all items from the Dictionary
SortDictionary Method Sorts the Dictionary items. This method copies all keys and items to arrays, sorts the array, removes all items from the dictionary, and then re-populates the dictionary with the contents of the sorted array.

Overview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence