CHAOSinACT
Registered User.
- Local time
- Today, 12:18
- Joined
- Mar 18, 2009
- Messages
- 235
I think this should be easy; for some reason it isn't.
I'm trying to clear an existing class collection. To start with :
has interesting results. watching it under action, what happens is it works out the correct count of the collection and then get HALFWAY through clearing and stops. if I step through it it keeps re-running the code till clear, every time saying it cleared half before and now half left, so it start with 16, removes 8. starts at 8, removes 4. etc. till 1 left then gone. it works on step through, locks up otherwise.
for some reason, i can't use
set colBars = nothing
i can for the initialization in the beginning but NOT for erasing existing collections?!? seems odd, but Access "will not let that pass".
if ChrisO is watching, yes it's your collection I'm modifying
Am I missing something? I would expect
set colBars = nothing
to just work...
:banghead:
edit: its a subscript out of range error too. though I don't see how thats the case...
I'm trying to clear an existing class collection. To start with :
Code:
lngIndex = 1
For lngIndex = 1 To colBars.Count
colBars.Remove (lngIndex)
Next lngIndex
has interesting results. watching it under action, what happens is it works out the correct count of the collection and then get HALFWAY through clearing and stops. if I step through it it keeps re-running the code till clear, every time saying it cleared half before and now half left, so it start with 16, removes 8. starts at 8, removes 4. etc. till 1 left then gone. it works on step through, locks up otherwise.
for some reason, i can't use
set colBars = nothing
i can for the initialization in the beginning but NOT for erasing existing collections?!? seems odd, but Access "will not let that pass".
if ChrisO is watching, yes it's your collection I'm modifying
Am I missing something? I would expect
set colBars = nothing
to just work...
:banghead:
edit: its a subscript out of range error too. though I don't see how thats the case...
Last edited: