DIAdem Help

Method: Items for Dictionary

  • Updated2024-09-12
  • 1 minute(s) read

Method: Items for Dictionary

Returns an array with the elements from a Dictionary collection.

vItems = Object.Items
ObjectDictionary
Object with this method
vItemsVariant
Receives the array with the elements.

The following example generates a Dictionary collection and adds some key/element pairs. Then the example displays the list of all elements:

Dim MyDic, MyItems, MyItem, sOutput
Set MyDic = CreateObject("Scripting.Dictionary")
Call MyDic.Add("a", "Austin")
Call MyDic.Add("b", "Berlin")
Call MyDic.Add("c", "Chicago")
MyItems = MyDic.Items
For Each MyItem in MyItems
  sOutput = sOutput & MyItem & VBCrLf
Next
Call MsgBox(sOutput)

Log in to get a better experience