Sub IterateCollection()
Dim colNames As Collection
Dim varItem As Variant
Set colNames = New Collection
colNames.Add "A", "A"
colNames.Add "Dan", "Dan"
colNames.Add "Al", "Ale"
colNames.Add "B", "Bren"
colNames.Add "S", "Son"
colNames.Add "Sue", "Su"
For Each varItem In colNames
Debug.Print varItem
Next varItem
End Sub
|