要实现a(n)之类的动态数组好象不可以
在type.....end type语句中,当在用户自定义类型中声名大小固定得数组时,必须用数字文字或常数而不能用变量来声明数组的维数。如:
type aa
aa(1 to 100) as integer
cc as string*30
end type
dim dd(1 to 100) as aa
绝对可以:
模块(BAS)中:
Public Type Test
a As Integer
b As String
End Type
Public arrTest(3) As Test
窗体(FRM)中:
Private Type Test
a As Integer
b As String
End Type
Private arrTest(3) As Test