Thread: delete a row.
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default delete a row.

Sub ABC()
Dim myarray As Variant
myarray = Range("MyRange").Value
' convert to a 1D array
myarray = _
Application.Transpose(myarray)
For i = LBound(myarray) To UBound(myarray) - 1
myarray(i) = myarray(i + 1)
Next
ReDim Preserve myarray(1 To UBound(myarray) - 1)
For i = LBound(myarray) To UBound(myarray)
Debug.Print i, myarray(i)
Next
End Sub

--
Regards,
Tom Ogilvy


" wrote:

Sorry, didnt word that very well, I meant delete the row in the array
itself.
Regards Robert