I have the following declared in a module (simplified for example):
Public Structure ActiveDeviceInfo
Dim InStream As String
Dim InMsg() As String
Dim OutMsg() As String
Public Sub Initialize()
ReDim InMsg(30)
ReDim OutMsg(30)
End Sub
End Structure
then right after that I create the instance for the module. I need it to have the scope of the whole module instead of the individual subroutines.
Public ActiveRelay As New ActiveDeviceInfo
ActiveRelay.Initialize()
I'm getting the 'Declaration Expected' error on the Initialization call.
Any ideas on how to fix this?