VERSION 5.00 Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX" Begin VB.Form Form1 Caption = "Form1" ClientHeight = 3090 ClientLeft = 60 ClientTop = 450 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 3090 ScaleWidth = 4680 StartUpPosition = 3 'Windows Default Begin MSCommLib.MSComm MSComm1 Left = 480 Top = 720 _ExtentX = 1005 _ExtentY = 1005 _Version = 393216 DTREnable = -1 'True RThreshold = 1 End Begin VB.TextBox Text1 Height = 375 Left = 1680 TabIndex = 0 Text = "Text1" Top = 840 Width = 1455 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Form_Load() MSComm1.PortOpen = True End Sub Private Sub MSComm1_OnComm() On Error GoTo Error x = x + MSComm1.Input If Right$(x, 1) = "E" Then Text1.Text = x x = "" End If Exit Sub Error: End Sub