Sub test_arr3()
arr1 = Array(1, 2, 3, 999, 1, 3, 5)
For Each I In arr1
If I = "999" Then
I = ""
Else
Debug.Print I
End If
Next
dengbu.Print
End Sub
そして、フィルタメソッドを使用している場合
http://club.excelhome.net/thread-1238763-1-1.html
それは、ないので、難しいこと、ああ、と新しいフィルタアレイを作成することは容易配列であると思われます
Sub test_arr4()
arr1 = Array(1, 2, 3, 999, 1, 3, 5)
arr2 = Filter(arr1, 999, False)
For Each x In arr1
Debug.Print x;
Next
Debug.Print
For Each y In arr2
Debug.Print y;
Next
Debug.Print
End Sub
Sub test_arr6()
Dim arr2()
arr1 = Array(1, 2, 3, 999, 1, 2, 3)
'有个小问题,index为0的元素为空
J = 1
For I = LBound(arr1) To UBound(arr1)
If Not arr1(I) = 999 Then
ReDim Preserve arr2(J)
arr2(J) = arr1(I)
J = J + 1
End If
Next
For Each I In arr2
Debug.Print I
Next
End Sub