运行VB程序过程中报 subscript out of range怎么回事
Private Sub MSComm1_OnComm()Dim Inbyte() As Byte
ReDim Inbyte(59)
Dim buffer As String
Dim datatemp2a, datatemp2b As String
Dim datatemp2 As String
Dim datastr(20) As String
If num > 1440 Then Call renew
'读取仪表返回数据串
Select Case MSComm1.CommEvent
Case comEvReceive
Inbyte = MSComm1.Input
For i = LBound(Inbyte) To UBound(Inbyte)
buffer = buffer + Hex(Inbyte(i)) + Chr(32)
Next i
Case comEvSend
End Select
[color=#FFFF00] datatemp(num) = Val("&H" & Mid(Mid(buffer, 11, 6), 2, 2) & Mid(Mid(buffer, 11, 6), 5, 2)) * 0.01[/color]
补充:VB , 数据库(包含打印,安装,报表)