回复 5楼 风吹过b
sorry,我第一帖代码有问题,应该是下面这个,OnComm事件中的关闭文件这一行是注掉的。
Private Sub cmdNewLog1_Click()
Open CommonDialog4.FileName For Append As #SaveLogID
DisplayFlag1 = True
End Sub
Private Sub MSComm1_OnComm()
Select Case
Case comEvReceive
InBuff = MSComm1.Input
If DisplayFlag1 = True Then
Print #SaveLogID, InBuff
'Close #SaveLogID
End If
End Select
End Sub