LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Collection Look Up - By Key in an Excel VBA App.

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.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel data collection Bill Needham Excel Discussion (Misc queries) 2 January 11th 08 06:02 PM
Excel 2003 macro collection bluepuppet Excel Discussion (Misc queries) 3 January 17th 07 10:55 PM
how do i create a data collection form in excel? stacy New Users to Excel 1 October 26th 05 08:21 PM
excel columns collection? Ron Excel Programming 3 April 5th 05 09:20 PM
Keybindings Collection in Excel John[_88_] Excel Programming 1 July 26th 04 06:03 PM


All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"