I have inherited some code which I don't understand, but have to insert it into my database. When I go to compile my code it wont, saying objects not declared and point to comEventBreak . Anyone understand what the problem is, many thanks
Private Sub MSComm1_OnComm()
Static intComBreak As Integer
Dim Text3 As String
inp = MSComm1.Input 'Read machine reply
Select Case MSComm1.CommEvent
' Handle each event or error by placing
' code below each case statement
' Errors
Case comEventBreak ' A Break was received.
Text3 = "comEventBreak"
intComBreak = 1
Case comEventFrame ' Framing Error
Text3 = "comEventFrame"
Case comEventOverrun ' Data Lost.
Text3 = "comEventOverrun"
Case comEventRxOver ' Receive buffer overflow.
Text3 = "comEventRxOverFlow"
Case comEventRxParity ' Parity Error.
Text3 = "comEventParityError"
Case comEventTxFull ' Transmit buffer full.
Text3 = "comEventTxFull"
Case comEventDCB ' Unexpected error retrieving DCB]
Text3 = "comEventDCB"
' Events
Case comEvCD ' Change in the CD line.
Text3 = "comEvCD"
Case comEvCTS ' Change in the CTS line.
Text3 = "comEvCTS"
Case comEvDSR ' Change in the DSR line.
Text3 = "comEvDSR"
Case comEvRing ' Change in the Ring Indicator.
Text3 = "comEvRing"
Case comEvReceive ' Received RThreshold # of chars
Text3 = "comEvReceive"
Case comEvSend ' There are SThreshold number of
Text3 = "comEvSend"
' characters in the transmit
' buffer.
Case comEvEOF ' An EOF charater was found in
Text3 = "comEvEOF"
' the input stream
End Select
End Sub
Private Sub MSComm1_OnComm()
Static intComBreak As Integer
Dim Text3 As String
inp = MSComm1.Input 'Read machine reply
Select Case MSComm1.CommEvent
' Handle each event or error by placing
' code below each case statement
' Errors
Case comEventBreak ' A Break was received.
Text3 = "comEventBreak"
intComBreak = 1
Case comEventFrame ' Framing Error
Text3 = "comEventFrame"
Case comEventOverrun ' Data Lost.
Text3 = "comEventOverrun"
Case comEventRxOver ' Receive buffer overflow.
Text3 = "comEventRxOverFlow"
Case comEventRxParity ' Parity Error.
Text3 = "comEventParityError"
Case comEventTxFull ' Transmit buffer full.
Text3 = "comEventTxFull"
Case comEventDCB ' Unexpected error retrieving DCB]
Text3 = "comEventDCB"
' Events
Case comEvCD ' Change in the CD line.
Text3 = "comEvCD"
Case comEvCTS ' Change in the CTS line.
Text3 = "comEvCTS"
Case comEvDSR ' Change in the DSR line.
Text3 = "comEvDSR"
Case comEvRing ' Change in the Ring Indicator.
Text3 = "comEvRing"
Case comEvReceive ' Received RThreshold # of chars
Text3 = "comEvReceive"
Case comEvSend ' There are SThreshold number of
Text3 = "comEvSend"
' characters in the transmit
' buffer.
Case comEvEOF ' An EOF charater was found in
Text3 = "comEvEOF"
' the input stream
End Select
End Sub