Problem with collections
Hi I have a little problem.
I created a collection of boolean values and used keys to identify them.
But now when I try to modify their values I got an error message: Object does not exist.
Dim c as New Collection
c.Add True, "keyName"
c("keyName") = False 'Here I have an error
do somebody know how to resolve this problem?
[363 byte] By [
goast] at [2007-11-11 7:54:41]

# 1 Re: Problem with collections
I'm not sure why that happens, but you can avoid it by using a Dictionary instead of a Collection. Set a reference in your project to the Microsoft Scripting Runtime (scrrun.dll), then do this:
Dim c As New Dictionary
c.Add "keyName", True
c("keyName") = False