Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 6.0
Visual Basic 6.0
Reference
Language Reference
Objects
D
 Dictionary Object

  Switch on low bandwidth view
 
Visual Basic for Applications Reference

Dictionary Object

See Also    Example    Properties    Methods    Events    Specifics

Description

Object that stores data key, item pairs.

Syntax

Scripting.Dictionary

Remarks

A Dictionary object is the equivalent of a PERL associative array. Items, which can be any form of data, are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually a integer or a string, but can be anything except an array.

The following code illustrates how to create a Dictionary object:

Dim d                   'Create a variable
Set d = CreateObject(Scripting.Dictionary)
d.Add "a", "Athens"     'Add some keys and items
d.Add "b", "Belgrade"
d.Add "c", "Cairo"
...
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker