Click here to Skip to main content
14,644,614 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi, I am not expert in Visual Basic coding and I need to store data from hyper terminal into some files.
For that I need API which is read data from hyper terminal and store somewhere in file.

Any help for me can be appreciated.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1


Follow of these code you can open port and read data from Hyper Terminal:

Option Explicit
Private Buffer As String

Private Sub Form_Load()
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"

        If MSComm1.PortOpen Then
            MSComm1.RThreshold = 1
            MSComm1.InputLen = 1
            MSComm1.CommPort = 1
            If Not MSComm1.PortOpen Then 
	        MSComm1.PortOpen = True
                MsgBox "Warrning!:fail to open port."
            End If
        End If
End Sub

Private Sub MSComm1_OnComm()
    Select Case MSComm1.CommEvent
    Case comEvReceive
        Buffer = MSComm1.Input
    End Select
End Sub

Private Sub MyParser()
    Do While Len(Buffer) <> 0
        Text1.Text = Text1.Text & ""
        IF MSComm1.InBufferCount > 0 Then 
            Buffer = Buffer & MSComm1.Input
        End IF
End Sub

Additionally you can use this link[^] for write your data from Excel file and you can download example of Mscomm follow of this link[^] ;)

Best Regards.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100