JohnRobinAllen
asked on
With a VBA Collection (in Word), can I access both the data and the key stored?
Using VBA in Word, if I have stored strings in a collection, each with a different Key, is it possible to go through all the members of the collection and retrieve not only the stored string but also the key that accesses the string?
The following code displays the strings of data stored inside "MyCollection":
Dim x as Variant
For each x in MyCollection
Msgbox x
Next x
What I need is something that will also tell me the keys that access those data.
Thanks!
j.r.a.
The following code displays the strings of data stored inside "MyCollection":
Dim x as Variant
For each x in MyCollection
Msgbox x
Next x
What I need is something that will also tell me the keys that access those data.
Thanks!
j.r.a.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help :)
The Dictionary is one of my favorite objects.
The Dictionary is one of my favorite objects.
ASKER
j.r.a.