How can I get the key of each item in collection?
here is a sample code.
dim col as new collection
col.add item1, keyitem1
col.add item2, keyitem2
for n = 1 to col.count
item = col.item
? key = col.keys
next n
i can get item by n, but how to get key of item by n?
i tried to use a similar method for scripting.dictionary
to get key, but it does not work. Thanks for helping me out
here is a sample code.
dim col as new collection
col.add item1, keyitem1
col.add item2, keyitem2
for n = 1 to col.count
item = col.item
? key = col.keys
next n
i can get item by n, but how to get key of item by n?
i tried to use a similar method for scripting.dictionary
to get key, but it does not work. Thanks for helping me out