运行出错:use-defined type not defined
显示的是这行Public Sub SubReceive(Addr As Byte, dataType As Byte, RcvUART As Byte, CheckOut As Boolean, MSC As MSComm)
详情回复
发表于 2007-7-18 16:35
//接收子程序
Public Sub SubReceive(Addr As Byte, dataType As Byte, RcvUART As Byte, CheckOut As Boolean, MSC As MSComm)
Dim instring() As Byte, temp As Variant
Dim Checksum As Long, bytChecksum As Byte, i As Integer
Checksum = 0 '校验码等于收到的校验码,CheckOut为ture,否则为flase
For i = 0 To 3
Checksum = (Checksum + instring(i))
Next i
bytChecksum = Checksum Mod 256#
If bytChecksum <> instring(4) Then
CheckOut = False
Else
CheckOut = True
End If
End Sub
//发送子程序
Public Sub SubSend(Addr As String, dataType As String, UARTdata As String, MSC As MSComm)
Dim Sentdata(0 To 5) As Byte
Dim i As Integer
Dim Checksum As Long