How can I create a nested structure in VBA? When I try the following code in VB Editor it is saying “Statement invalid inside type block”.
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
Remove the
Dimfrom the 2nd Type (and spellFunctiondetailscorrectly!);You should be ok but it also may not like
Functionas an identifier.