I have an array of strings MyStrArrayand I have a dictionary objectMyDict
How to transfer MyStrArrayin MyDict.keys without loop ? Is it possible?
if I try to execute MyDict.keys = MyStrArrayI get the error message "the object does not support this method", and the key boundaries MyDict.Keys(0 to -1)I know what this means, and I know that I can iterate over the array to fill the dict. as simple (simple example)
on error resume next
for i= Lbound(MyStrArray) To Ubound(MyStrArray)
MyDict.add key:=MyStrArray(i), item:=whatever
next i
So is there a way around this?
source
share