Article ID: 189735
Article Last Modified on 5/13/2003
Sub Main()
Dim c As New Collection
Dim a As Long
Set c = New Collection
'Add elements to collection
For a = 1 To 10000
c.Add "Thank you sir, may I have another."
Next a
MsgBox "Done adding elements"
'Remove elements from end, this takes long time
For a = 10000 To 1 Step -1
c.Remove a
Next a
MsgBox "Done removing elements from end"
'Add elements to collection again
For a = 1 To 10000
c.Add "Thank you sir, may I have another."
Next a
MsgBox "Done adding elements"
'Remove elements from beginning, this is much quicker
For a = 1 To 10000
c.Remove 1
Next a
MsgBox "Done removing elements from end"
End Sub
Additional query words: kbDSupport kbVBp600bug kbVBp kbdss kbNoKeyWord
Keywords: kbbug KB189735