VB 下标越界,求大家指点一下,帮助!程序如下
For tmpi = 0 To 5txtRecieve.Text = Trim(txtRecieve.Text) & " " & IIf(Len(Hex$(getBytes(tmpi))) > 1, Hex$(getBytes(tmpi)), "0" & Hex$(getBytes(tmpi)))
Next tmpi
Text1.Text = CInt((getBytes(0) * 256 + getBytes(1)) / 4096 * 3300)
Text2.Text = CInt((getBytes(2) * 256 + getBytes(3)) / 4096 * 3300)
Text3.Text = CInt((getBytes(4) * 256 + getBytes(5)) / 4096 * 3300)
Case comEvSend ' 传输缓冲区有 Sthreshold 个字符 '
Case comEvEOF ' 输入数据流中发现 EOF 字符
End Select
End Sub
getbytes(tmpi)提示下标越界!!不知道问题出在哪里