A Dictionary object is an associative array. Items can be any form of data, and are stored in the array. Each item is associated with a unique key.
It is part of VBScript. To use a Dictionary from VBA, first you need to set a reference to Microsoft Scripting Runtime.
This is how you create a dictionary object:
Dim dic As New Dictionary
dic.Add "a", "aaa"
dic.Add "b", "bbb"
dic.Add "c", "ccc"
This is how you access an item through a key:
Debug.Print dic.Item("b")
The result is "bbb"
This is how you iterate through the dictionary object and print all the key and item pairs:
Dim key As Variant
For Each key In dic.Keys
Debug.Print CStr(key) & " - " & dic.Item(key)
Next