Try this code behind a command button:
Private Sub Command1_Click()
Dim cList as Collection
Set cList = New Collection
cList.Add 1, "A"
cList.Add 4, "B"
cList.Add 9, "C"
Msgbox cList.Item("B")
End Sub
Does clicking the message box pop-up a message box
with a 4 in it?
When I call an item in a collection I have trouble calling it by
its key (a
string).The sytax does not force me to put a number in where as
the keys are
stringa values and it should recall an item by its key string
value.