简体   繁体   中英

excel VBA dynamic size of array-array

I simply have the issue that I need to create an array with a number of arrays. the problem is that the number of the arrays are only known at runtime. so, how can initialize (create) the array with the correct size?

Thanks a lot!

As per Ron's comment, use variables to set your array when it is known.

Dim lngRow As Long
Dim lngCol As Long
Dim X()
lngRow = 100
lngCol = 15
ReDim X(1 To lngCol, 1 To lngRow)

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