Retrieve the index of an object stored in a collection using its key (VBA)

后端 未结 4 837
一整个雨季
一整个雨季 2020-12-11 11:01

I have a collection with several elements in VBA, each of these elements has a key assigned.

I would like to know the position of a given element in the collection u

4条回答
  •  借酒劲吻你
    2020-12-11 11:49

    There is no way that I have found to return the index, however if you have a collection of user defined objects that will only be stored in a single collection you can add an index property to the object and set it when the object is added to the collection.

提交回复
热议问题