你好改了还是不行?
Public Sub Send_ZK_Data(ByVal lineID As Byte, ByVal NeedOpen As Byte)
On Error Resume Next
Dim zk_sd(0 To 10) As Byte
zk_sd(0) = &HEB
zk_sd(1) = &H0
zk_sd(2) = &H0
zk_sd(3) = &H0
zk_sd(4) = lineID
zk_sd(5) = NeedOpen
zk_sd(6) = &H0
zk_sd(7) = &H0
MSComm_ZK.Output = zk_sd
MSComm_ZK.RThreshold = 1
End Sub