V
vmegha
Hi,
I have used a collection to store a set of Objects that I need to look
up by the Key value...
Like
Dim c As Collection
Set c=New Collection
c.Add Obj, Obj.Key
Neither of these seem to work-
Key = c(Obj.Key)
Or
Key = c.Item(Obj.Key)
Although the help on the VBA Collection object behaviour seems to
support either of these two types of Look Up.
Is there some Version / Application Dependency that i might be mnissing
here?
Also I had to replace the collection with a dictionary for this to
work. My observation has been that "Add" into a Dictionary is slower
compared to a collection. The Lookup I havent been able to compare,
since I havent been able to Look up an Obj by key from a collection.
Help / Ideas, Please?
Thanks in Advance,
Megha.
I have used a collection to store a set of Objects that I need to look
up by the Key value...
Like
Dim c As Collection
Set c=New Collection
c.Add Obj, Obj.Key
Neither of these seem to work-
Key = c(Obj.Key)
Or
Key = c.Item(Obj.Key)
Although the help on the VBA Collection object behaviour seems to
support either of these two types of Look Up.
Is there some Version / Application Dependency that i might be mnissing
here?
Also I had to replace the collection with a dictionary for this to
work. My observation has been that "Add" into a Dictionary is slower
compared to a collection. The Lookup I havent been able to compare,
since I havent been able to Look up an Obj by key from a collection.
Help / Ideas, Please?
Thanks in Advance,
Megha.