I'm new at this... I'm using VB6 to create a formless console application.
I have Sub Main in Module1
I have a UserControl form (Named Comm) with MSComm1 embedded (Microsoft Comm Control 6.0) as I wish to do some serial port communications.
In the usercontrol I have a sub routine:
Public Sub OpenPort()
MSComm1.PortOpen = True
End Sub
In the main sub I call OpenPort:
Public Sub Main()
Call OpenPort
End Sub
When I run this, I get "Sub or Function not defined" and "Call OpenPort" is highlighted.
I don't understand why I get this error....
I have Sub Main in Module1
I have a UserControl form (Named Comm) with MSComm1 embedded (Microsoft Comm Control 6.0) as I wish to do some serial port communications.
In the usercontrol I have a sub routine:
Public Sub OpenPort()
MSComm1.PortOpen = True
End Sub
In the main sub I call OpenPort:
Public Sub Main()
Call OpenPort
End Sub
When I run this, I get "Sub or Function not defined" and "Call OpenPort" is highlighted.
I don't understand why I get this error....