I have created a structure in a Module:
The AxisConfiguration & LegendConfiguration work properly.
The TraceConfiguration(48) when used causes the error
My intention is such that usage is as follows:
Graph.TraceConfiguration(bb).AxisIndex = 1
The error generated is "Object reference not set to an instance of an object.", and refers to a line similar to the previous line of text.
I'm pretty sure it has to do with the <VBFixedArray(48)> Shared TraceConfiguration() As CTPParm line of code.
Incidentally, the CTPParm structure is used by other structures and works fine.
I can't figure out how to fix this.
Any assistance and/or insight would be greatly appreciated!
Thanks!
Code:
Structure CTPParm
Dim Color As Long
Dim LineWeight As Integer
Dim Title As String
Dim Position As Long
Dim AxisIndex As Integer
End Structure
Structure Graph
Public Shared AxisConfiguration As AxisConfig
Public Shared LegendConfiguration As LegendConfig
<VBFixedArray(48)> Shared TraceConfiguration() As CTPParm
Public Sub Initialize()
ReDim TraceConfiguration(48)
End Sub
End Structure
The AxisConfiguration & LegendConfiguration work properly.
The TraceConfiguration(48) when used causes the error
My intention is such that usage is as follows:
Graph.TraceConfiguration(bb).AxisIndex = 1
The error generated is "Object reference not set to an instance of an object.", and refers to a line similar to the previous line of text.
I'm pretty sure it has to do with the <VBFixedArray(48)> Shared TraceConfiguration() As CTPParm line of code.
Incidentally, the CTPParm structure is used by other structures and works fine.
I can't figure out how to fix this.
Any assistance and/or insight would be greatly appreciated!
Thanks!