View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
G Lykos G Lykos is offline
external usenet poster
 
Posts: 74
Default How to read a collection name index value?

Greetings!

You can use a collection index value, for example Gizmos(13).Name, to get
the name of item 13. Am wondering if there is an equivalent direct
mechanism to use a collection item name to get its index value, along the
lines of Gizmos("SomeName").Index. If symmetrical functions (properties, I
guess, in VBA speak) existed, Gizmos(Gizmos("SomeName").Index).Name would
return "SomeName" - an identity property of sorts.

I suppose a brute-force approach would be to create a function doing a For
name/string comparison loop over 1 to Gizmos.count. Am hoping for something
more direct.

Thanks,
George