Possible Duplicate:
VBA collection: list of keys
Maybe it is a very simple question, but I am new in VBA. I have some data that I want use as Collection(key,value). How can I get key by the value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think you can do this with the
Collectionobject.You can, however, use the alternative
Dictionary, which you need to include in your Excel project from the VBA editor: click the “Tools” menus, select “References” and locate “Microsoft Scripting Runtime”, after which you should be able to do something like this: