I hope this is the right forum. I am getting a System.NullReferenceException in my code. I have googled and haven't had any success. I use to be faily decent at VB, but haven't used it in a couple years so I am a bit rusty.
This is my Module1.vb
This is my Form1.vb - I have ommited some code.
My error occurrs on these lines.
This is my Module1.vb
VB.NET:
Imports System.IO
Public Structure MonthData
Public aDayData() As DayData
Public intMonth As Integer
End Structure
Public Structure DayData
Public aHourData() As HourData
Public intDay As Integer
End Structure
Public Structure HourData
Public aMinuteData() As MinuteData
Public intHour As Integer
End Structure
Public Structure MinuteData
Public aCarData() As CarData
Public intMinute As Integer
End Structure
Public Structure CarData
Public intCarSpeed As Integer
End Structure
Module Module1
Public strMonthData As String
Public sMonth As MonthData
End Module
This is my Form1.vb - I have ommited some code.
VB.NET:
Imports System.IO
Imports RoadSpeedAnalyzer.Module1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sMonth As MonthData
sMonth.intMonth = 0
sMonth.aDayData(0).intDay = 3
sMonth.aDayData(0).aHourData(0).aMinuteData(0).aCarData(0).intCarSpeed = 35
End Sub
My error occurrs on these lines.
VB.NET:
sMonth.aDayData(0).intDay = 3
sMonth.aDayData(0).aHourData(0).aMinuteData(0).aCarData(0).intCarSpeed = 35