
Adding objects to collections
I am trying to add a 'large' amount of objects to a collection.
It seems that it is not possible to add more then 256 objects
to a collection.
Adding more objects in code, does not add the object to
the collection and does not generate a runtime error.
Is this a VB5 bug or is there a limit on the number of objects
you can add to a collection ?
This is some sample code:
dim objTest as object
dim colTest as new collection
for counter=1 to 10000
set objTest = new object
'set object data
colTest.add objTest
next
If you I look in the watch window, I see that only
256 of the 10000 objects are added }:-|
Please help !
Koen