samisamih
05-21-2015, 06:59 AM
i want to erase the value from the array partially (not to reset all the array )
the code
Sub m()
Dim arr(1 To 10) As Integer
For i = 1 To 10
arr(i) = i
Next i
Erase arr(1 to 9) - ErrOr
Cells(1, 2).Resize(UBound(arr)).Value = Application.Transpose(arr)
End Sub
in the above code i wrote: erase arr(1 to 9),"the indexes that i want to reset again" and i want the last index : arr(10) not be reset again, is there a way to do this
thanks
the code
Sub m()
Dim arr(1 To 10) As Integer
For i = 1 To 10
arr(i) = i
Next i
Erase arr(1 to 9) - ErrOr
Cells(1, 2).Resize(UBound(arr)).Value = Application.Transpose(arr)
End Sub
in the above code i wrote: erase arr(1 to 9),"the indexes that i want to reset again" and i want the last index : arr(10) not be reset again, is there a way to do this
thanks