I'd like to expose my Dictionary(int, obj) to COM so the VBA people can do for i = 1 to UnitKey.Count
. I thought I could simply Public Function UnitKeys() As KeyCollection
, but "KeyCollection isn't defined". What is the proper way to expose these?
Asked
Active
Viewed 24 times
0
![](../../users/profiles/1469457.webp)
Maury Markowitz
- 8,303
- 8
- 36
- 79
-
Are you writing your code in VBA or something else? – ChipsLetten Jun 12 '15 at 15:27
-
VBA. Hans gave me some excellent advice on exposing the ValueCollection through a custom interface, but it doesn't seem possible to expose both with the same API (i.e., `.Count` for the keys and values). – Maury Markowitz Jun 13 '15 at 12:55
-
1I think you should add more detail to your post. Do you have a class or something else? – ChipsLetten Jun 13 '15 at 15:46