Private Sub Form_Load()
Dim A() As String
ReDim A(1 To 5)
Dim i As Integer
Dim j As Integer
Dim n As String
Dim temp As String
A(1) = "100": A(2) = 101: A(3) = "102": A(4) = "103": A(5) = "105"
n = InputBox("请输入新学生号:")
j = Val(InputBox("请输入要插入的位置:"))
Print
Print Tab(4); "新学生号为:" & n & " "; "插入位置为:" & j
ReDim Preserve A(1 To 6)
For i = j To 6
temp = A(i)
A(i) = n
n = temp
Next i
Print Tab(4);
For i = 1 To 6
Print A(i); " ";
Next i
End Sub
这是一个数组插入的代码 那位大虾帮忙解释一下从for i = j to 6 到 Next i 之间这几句代码的意思 是怎样实现了数据的插入 这几句我不理解