能帮我看看这段程序哪里错了吗?生成的EXE提示下标越界
PrivateSubForm_Load()DimiAsIntegerDimText()Fori=0To3Text1(i).LinkTopic="view|tagname"...
Private Sub Form_Load()
Dim i As Integer
Dim Text()
For i = 0 To 3
Text1(i).LinkTopic = "view|tagname"
Next
Text1(0).LinkItem = "plc.STATIC100"
Text1(1).LinkItem = "plc.STATIC101"
Text1(2).LinkItem = "plc.STATIC102"
Text1(3).LinkItem = "plc.STATIC103"
Text1(0).LinkMode = 1
Text1(1).LinkMode = 1
Text1(2).LinkMode = 1
Text1(3).LinkMode = 1
End Sub
Private Sub Text1_Change(Index As Integer)
Dim Text()
vbtoview.Text = Text1(0).Text
vbtoview1.Text = Text1(1).Text
vbtoview2.Text = Text1(2).Text
vbtoview3.Text = Text1(3).Text
End Sub 展开
Dim i As Integer
Dim Text()
For i = 0 To 3
Text1(i).LinkTopic = "view|tagname"
Next
Text1(0).LinkItem = "plc.STATIC100"
Text1(1).LinkItem = "plc.STATIC101"
Text1(2).LinkItem = "plc.STATIC102"
Text1(3).LinkItem = "plc.STATIC103"
Text1(0).LinkMode = 1
Text1(1).LinkMode = 1
Text1(2).LinkMode = 1
Text1(3).LinkMode = 1
End Sub
Private Sub Text1_Change(Index As Integer)
Dim Text()
vbtoview.Text = Text1(0).Text
vbtoview1.Text = Text1(1).Text
vbtoview2.Text = Text1(2).Text
vbtoview3.Text = Text1(3).Text
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询