ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Collection Key (https://www.excelbanter.com/excel-programming/356481-collection-key.html)

gabch[_8_]

Collection Key
 

How can I get back the key of collection object?

Best regards
Gabriel


--
gabch
------------------------------------------------------------------------
gabch's Profile: http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=524270


Robin Hammond[_2_]

Collection Key
 
Gabriel,

Ridiculous as it sounds, I don't think you can.

Robin Hammond
www.enhanceddatasystems.com


"gabch" wrote in
message ...

How can I get back the key of collection object?

Best regards
Gabriel


--
gabch
------------------------------------------------------------------------
gabch's Profile:
http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=524270




Tom Ogilvy

Collection Key
 
You can't get a list of keys for elements in a collection unless they match
the item stored in the collection.

Maybe a dictionary object from the scripting runtime would be better.

--
Regards,
Tom Ogilvy


"gabch" wrote:


How can I get back the key of collection object?

Best regards
Gabriel


--
gabch
------------------------------------------------------------------------
gabch's Profile: http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=524270



Chip Pearson

Collection Key
 
Unfortunately, there is no way to read the keys of a collection.
You might consider using a Dictionary object.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"gabch"
wrote in message
...

How can I get back the key of collection object?

Best regards
Gabriel


--
gabch
------------------------------------------------------------------------
gabch's Profile:
http://www.excelforum.com/member.php...o&userid=30662
View this thread:
http://www.excelforum.com/showthread...hreadid=524270




[email protected]

Collection Key
 
Hi
I tend to hold the key, if i need it, as part of the object in the
collection. So a collection of text strings would now be two element
arrays - the first one the string and the second one the key.

regards
Paul



All times are GMT +1. The time now is 11:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com