G
Guest
I'm having trouble assigning values to a structure that has been created in a
Module. When I run the Main Subroutine it errors out when I try to assign a
value to the Id1 array with "Object not set to instance..." blah blah - even
though I have clearly just instanciated it in the previous line.
Any ideas?
Thanks,
John (see code below)
Module Main
Structure zFuheader
Dim Id1() As Byte
Dim Id2() As Byte
Dim Id3() As Byte
Dim Id4() As Byte
End Structure
Sub Main()
Dim zHeader As zFuheader
Try
zHeader = New zFuheader
zHeader.Id1(1) = Byte.Parse("1")
Catch ex As Exception
Console.Writeline(ex.Message)
End Try
End Sub
End Module
Module. When I run the Main Subroutine it errors out when I try to assign a
value to the Id1 array with "Object not set to instance..." blah blah - even
though I have clearly just instanciated it in the previous line.
Any ideas?
Thanks,
John (see code below)
Module Main
Structure zFuheader
Dim Id1() As Byte
Dim Id2() As Byte
Dim Id3() As Byte
Dim Id4() As Byte
End Structure
Sub Main()
Dim zHeader As zFuheader
Try
zHeader = New zFuheader
zHeader.Id1(1) = Byte.Parse("1")
Catch ex As Exception
Console.Writeline(ex.Message)
End Try
End Sub
End Module