Arrays 如何重新确定嵌套数组的尺寸?

Arrays 如何重新确定嵌套数组的尺寸?,arrays,vba,nested,Arrays,Vba,Nested,我有以下代码: Public Type Calculations a1 As Double a2 As Double End Type Private Type Points Point() As Calculations End Type Private Type Sections Section() As Points End Type Sub test() Dim t As Sections ReDim Preserve t.Sec

我有以下代码:

Public Type Calculations
    a1 As Double
    a2 As Double
End Type

Private Type Points
    Point() As Calculations
End Type

Private Type Sections
    Section() As Points
End Type

Sub test()

    Dim t As Sections

    ReDim Preserve t.Section(5) '<< This works!!
    'ReDim Preserve t.Section(5).Point(5)

End Sub
公共类型计算
a1为双
a2作为双
端型
专用类型点
点()作为计算
端型
专用型区段
节()作为点
端型
子测试()
尺寸t作为截面

第(5)节“它必须是一个bug。它在我的Excel版本中工作。当我在VBA编辑器中单击“关于”时,它说它是Retail 7.1.1089这是一个锯齿阵列。它在VBA中工作不好。。。请看这篇文章:基本上,如果你想重新定义内部数组,你需要使用一个临时变量iirc