数据类型不匹配:缺少数组或用户自定义类型
Public Function YingDa(ByRef ml() As Byte) '应答函数Dim yd(5) As Byte
Dim ydml(5) As Byte
ydml(0) = &H81
ydml(1) = &H0
ydml(2) = &H6
ydml(3) = &H0
ydml(4) = &H4B
ydml(5) = &H4D
YanShi (2)
MSComm1.InputMode = comInputModeBinary '按2进制接收方式
yd = MSComm1.Input '接收应答命令
If yd <> ydml Then
MSComm1.OutBufferCount = 0 '清除发送缓冲区
MSComm1.InBufferCount = 0 '清除接收缓冲区
MSComm1.Output = ml '设置量限
YanShi (2)
MSComm1.InputMode = comInputModeBinary '按2进制接收方式
yd = MSComm1.Input '接收应答命令
ElseIf yd = ydml Then
End If
End Function
这是我自定义的函数 调用时候提示:数据类型不匹配:缺少数组或用户自定义类型
什么原因呢,我调用的YingDa (lx) lx有定义啊 Dim lx(11) As Byte
补充:VB , 网络编程