NBartomeli
Programmer
I am trying to create arrays of structs nested in other structs in my class, as follows:
My problem is when I do a statement like: "Redim Preserve subgroup.metric(+1)", on the first pass it makes an array of 2, not one. If I try to assign a value to the array in position 0 without a redim, I get a "not set to an instance of object" error.
Is there any way around this? Thanks
Code:
<Serializable()> _
Public Structure clsEquityTrackerMetric
Public Name As String
Public Measure As String
Public MeasureID As String
Public MeasureType As String
Public ThresholdHigh As Integer
Public ThresholdLow As Integer
End Structure
<Serializable()> _
Public Structure clsEquityTrackerGroup
Public Name As String
Public ID As Integer
Public SubGroup() As clsEquityTrackerSubGroup
End Structure
<Serializable()> _
Public Structure clsEquityTrackerSubGroup
Public Name As String
Public ID As Integer
Public Metric() As clsEquityTrackerMetric
End Structure
My problem is when I do a statement like: "Redim Preserve subgroup.metric(+1)", on the first pass it makes an array of 2, not one. If I try to assign a value to the array in position 0 without a redim, I get a "not set to an instance of object" error.
Is there any way around this? Thanks