I am making a GUI based application (forms), and encountered the following error.
Firstly, I am declaring the following stuff in a module
Module test_mod
By default modules and classes are Friend (only visible to your assembly).
Your form, however, is explicitly Public
, which exposes it and its members to the world - which extends test_mod.main_struct
's visibility.
Declare your module as Public
too.
Try this:
Public Module test_mod
Public Structure sub_struct
Public test_int() As Integer
Public Sub foo()
ReDim test_int(3)
End Sub
End Structure
Public Structure main_struct
Public test_aaa As sub_struct
End Structure
End Module
Source: http://msdn.microsoft.com/en-us/library/aaxss7da.aspx