Sample to Use Dictionary Object in VB6
Sample to Use Dictionary Object in VB6
Rate Sample to Use Dictionary Object in VB6
(2(2 Vote))
'You need to have reference to Microsoft Scripting Runtime first.
'Put a ListBox on your form to accept the result.
'The following code illustrates how to create a Dictionary object:
'
Dim a
Dim d
'
Set d = CreateObject("Scripting.Dictionary")
d.Add "a", "Athens" 'Add some keys and items
d.Add "b", "Belgrade"
d.Add "c", "Cairo"
d.Add "d", "Detroit"
d.Add "e", "Emory"
d.Add "f", "Fairfax"
'
a = d.Items 'Get the items
'
For I = 0 To d.Count - 1 'Iterate the array
List1.AddItem a(I)
Next
'
Sample to Use Dictionary Object in VB6 Comments
No comments yet — be the first to post one!
Post a Comment