property Dictionaries.Item (key as Variant) as Dictionary
Return an item from the collection. The key can be the name of the dictionary or an index.

TypeDescription
key as Variant A long expression that indicates the index of the dictionary in the collection, a string expression that indicates the name of the dictionary.
Dictionary A Dictionary object being returned.

Use the Item property to access a Dictionary object. The Count property counts the number of items in the collection. Use the Dictionaries properties to access the server's available dictionaries. The Item property is the default property for the Dictionaries object so the following statements are equivalents:

Dictionaries.Item(i)

or

Dictionaries(i)

The following sample displays the dictionaries available on the server ( the sample enumerates the collection of dictionaries, using the for each statement ):

Private Sub Form_Load()
    Dim c As EXDICTCLIENTLibCtl.Connection
    Set c = Client1.OpenConnection("dict.org")
    If Not (c Is Nothing) Then
        Dim d As EXDICTCLIENTLibCtl.IDictionary
        For Each d In c.Dictionaries
            Debug.Print d.Name & " " & d.Description
        Next
        c.Close
    End If
    Set c = Nothing
End Sub

The following sample prints all dictionaries available on the server ( the sample enumerates the collection of dictionaries, using the Item and Count properties ):

Private Sub Form_Load()
    Dim c As EXDICTCLIENTLibCtl.Connection
    Set c = Client1.OpenConnection("dict.org")
    If Not (c Is Nothing) Then
        Dim d As EXDICTCLIENTLibCtl.IDictionary
        Dim i As Long
        For i = 0 To c.Dictionaries.Count - 1
            Set d = c.Dictionaries.Item(i)
            Debug.Print d.Name & " " & d.Description
        Next
        c.Close
    End If
    Set c = Nothing
End Sub