第1个回答 推荐于2018-05-18
Private Sub Form_Load()
Dim a(4) As Integer
a(0) = 0
a(1) = 1
a(2) = 2
a(3) = 3
For i = 0 To UBound(removearray(a, 2)) - 2
Debug.Print removearray(a, 2)(i)
Next
End Sub
Private Function removearray(a() As Integer, index As Integer)
j = 0
For i = 0 To UBound(a) - 1
If i <> index Then
a(j) = a(i)
j = j + 1
End If
Next
removearray = a()
End Function本回答被提问者和网友采纳