简体   繁体   中英

Convert Items of a List/Dictionary to the first column of a 2D Array VBA

Pretty new to VBA here and would like some help.

So, I have a dictionary containing 3600 items and another pre-defined array with 3600 rows and 4 columns. How can I move all items from the dict to the first column of the array?

Thanks in advance.

This is simple and you should be able to do it if you have created your dictionary and your array...

See below code. Loop through your dictionary and add the items to the array.

For i = 1 to myDict.Count
    myArr(i,1) = myDict(i)
Next i

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM