求助 chr(a(i))下标越界问题
我刚才学习vb6。这是我模仿编程的一个把一组ascii码转换成字符的,但结果显示下标越界,无法搞清是那里越界了。请大师帮修改一下或指出问题所在这是我的
Dim i As Integer
Dim a
Private Sub Command1_Click()
Command2 = Command1.hWnd
If Text1 <> "" Then
Timer1.Enabled = True
Else
MsgBox "请输入内容!", 48, "提示"
End If
End Sub
Private Sub Command2_Click()
Open "e:\1.txt" For Output As #1
Print #1, Text2
Close #1
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 10
i = 0
End Sub
Private Sub Timer1_Timer()
i = i + 1
a = Split(Text1, "/")
Text3 = Chr(a(i))
Text2 = Text3 + Text2 '这里如果text4=text4+text3就会倒着输出
If X >= Len(Text1) Then
Timer1.Enabled = False
End If
If Command1 = Click Then
Command2_Click
End If
End Sub
[此贴子已经被作者于2016-1-21 15:59编辑过]