wannabe1234
Programmer
Hi guys,
i wrote a program here to collect data and save the data to file where i can open the file later.
here the program i've wrote.
Private Sub Form_Load()
MSComm1.PortOpen = True
End Sub
Private Sub Timer1_Timer()
Dim InputString
If MSComm1.InBufferCount = 256 Then
Close #1
Open "c:\test.cli" For Output As #1
InputString = MSComm1.Input
For x = 1 To 256
A$ = Mid$(InputString, x, 1)
Print #1, Asc(A$)
Next x
End If
Close #1
End Sub
It require only time and mscomm to the form.
The result expected should store the data collect from port 1 and save it in file "test.cli" in c directory. No error occured during run. The only problem is that there is no file "test.cli" on c directory. please help. Thanks
i wrote a program here to collect data and save the data to file where i can open the file later.
here the program i've wrote.
Private Sub Form_Load()
MSComm1.PortOpen = True
End Sub
Private Sub Timer1_Timer()
Dim InputString
If MSComm1.InBufferCount = 256 Then
Close #1
Open "c:\test.cli" For Output As #1
InputString = MSComm1.Input
For x = 1 To 256
A$ = Mid$(InputString, x, 1)
Print #1, Asc(A$)
Next x
End If
Close #1
End Sub
It require only time and mscomm to the form.
The result expected should store the data collect from port 1 and save it in file "test.cli" in c directory. No error occured during run. The only problem is that there is no file "test.cli" on c directory. please help. Thanks