Redim size of array in VBA Excel -
i have problem use function redim
preserve in vba excel.
i redim
array use in macro before without clear data inside.
my macro looking :
dim table_data variant ... redim table_data(2 * n + 2 * m + 2 * n, table_case.listcolumns.count - 1) ... dim1 = ubound(table_data, 1) dim2 = ubound(table_data, 2) redim preserve table_data(0 dim1 + 2 * n, 0 dim2)
do have idea should modify?
when using preserve
keyword; can change size last dimension. size of other dimensions once declared must remain unaltered.
the code below should work:
redim preserve table_data(lbound(table_data, 1) ubound(table_data, 1), 0 dim2)
Comments
Post a Comment