Remove all the elements of a collection in two ways:
Sub AccessCollection()
Dim colNames As Collection
Set colNames = New Collection
colNames.Add "A", "A"
colNames.Add "Dan", "Dan"
colNames.Add "Al", "Ale"
colNames.Add "B", "Bre"
colNames.Add "S", "Son"
colNames.Add "Sue", "Su"
Set colNames = New Collection
'Or Set colNames = Nothing
End Sub
Related examples in the same category