[求助]使用MSComm1.Output时出现380无效属性值
Private Sub Command1_Click()Dim Num As Integer
Dim outT As Byte
Num = Val(Text1.Text)
outT = CByte(Num)
MSComm1.OutBufferCount = 0
MSComm1.Output = outT 实时错误‘380’ 无效的属性值
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
= 2
MSComm1.Settings = "9600,n,8,1"
MSComm1.PortOpen = True
End Sub
Private Sub MSComm1_OnComm()
Dim indata As Variant
Dim bte(0) As Byte
Select Case
Case comEvReceive
indata = MSComm1.Input
bte(0) = AscB(indata)
Text2.Text = bte(0)
MSComm1.InBufferCount = 0
End Select
End Sub
小弟自学vb 想做毕业设计
照着教程写一个简单的串口通讯程序 和单片机通讯
当在text里赋值后 一点Command1就会报错
Command1 第六行MSComm1.Output = outT 报错“实时错误 380 无效的属性值”
请各位大神帮忙看一下 怎么改
万分感谢