Do more with
Option Explicit
Dim chrCommInput As String
Private Sub myCommPort_OnComm()
Dim modemInput As String
If myCommPort.CommEvent = comEvReceive Then
modemInput = myCommPort.Input
If Len(modemInput) > 0 Then
If Asc(modemInput) = 13 Or Asc(modemInput) = 10 Then
If Asc(modemInput) = 10 Then
Debug.Print chrModemLine & "*"
MsgBox "This is the comm data:" & UCase(chrModemLine)
End If
Else
If Asc(modemInput) >= 32 And Asc(modemInput) <= 126 Then
chrCommInput = chrCommInput & modemInput
ElseIf Asc(modemInput) = 26 Then
chrModemLine = chrCommInput & " "
End If
End If
End If
End If
End Sub
Premium Content
You need an Expert Office subscription to comment.Start Free Trial