我redim在VBA Excel中使用函数保留有一些问题.
我想要redim一个我已经在宏中使用的数组,而不清楚已经存在的数据.
我的宏看起来像这样:
Dim table_data As 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 To dim1 + 2 * n, 0 To dim2)
Run Code Online (Sandbox Code Playgroud)
你知道我应该修改什么吗?