VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Sample to Use Dictionary Object in VB6

by Yuening Dai (30 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 9th January 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Sample to Use Dictionary Object in VB6

Rate Sample to Use Dictionary Object in VB6



'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
    '

Download this snippet    Add to My Saved Code

Sample to Use Dictionary Object in VB6 Comments

No comments have been posted about Sample to Use Dictionary Object in VB6. Why not be the first to post a comment about Sample to Use Dictionary Object in VB6.

Post your comment

Subject:
Message:
0/1000 characters