展开全部
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
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
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询