So I have this data structure thing to be rather open ended with the amount of data stored. Data is stored through a series of structures. Here are the structures and the variable I'm using:
Dim CurrentRec As Year
Structure Year
Dim Months() As Month
End Structure
Structure Month
Dim Dayz() As Days
Dim MiscExpend(,) As String
End Structure
Structure Days
Dim Incomes(,) As String
Dim Expenditures(,) As String
End Structure
And now I have a little test subroutine to test if it works.
Sub Test()
ReDim CurrentRec.Months(12).Dayz(31).Incomes(4, 4)
ReDim CurrentRec.Months(12).Dayz(31).Expenditures(4, 4)
CurrentRec.Months(5).Dayz(12).Incomes(1, 1) = 5
End Sub
Problem is, this code spits out a System.NullReferenceException error, and I can't for the like of me figure out why. Could anyone help?