2012-01-07 102 views
0

如何在VBA中创建嵌套结构?当我在VB编辑器中尝试下面的代码时,它会说“语句无效,内部类型块”。VBA中的嵌套结构

Type Functiondetails 

    Function As String 
    Sites(7) As String 
    Values(7) As Integer 

End Type 

Type Financialdetails 

    Metrics As String 

    Dim f(10) As Functiondetials  

End Type 

回答

2

取下第二类型的Dim(和拼写正确Functiondetails!);

Type Financialdetails 
    Metrics As String 
    f(10) As Functiondetails 
End Type 

您应该可以,但它也可能不会像Function作为标识符。

+0

谢谢,它的工作 – 2012-01-08 17:43:31