Removing Items from a Custom Collection
Sub AccessCollection()
Dim colNames As Collection
Set colNames = New Collection
colNames.Add "A", "A"
colNames.Add "Dan", "Dan"
colNames.Add "Al", "Al"
colNames.Add "B", "Br"
colNames.Add "S", "So"
colNames.Add "Sue", "Su"
colNames.Remove 2
Debug.Print colNames(1)
Debug.Print colNames.Item(1)
Debug.Print colNames("Alexis")
End Sub
Related examples in the same category