View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Change cut/paste operation to cut/insert operation

A very brief look suggests
With rToCut.EntireRow
.Copy Destination:=rDest


With rToCut.EntireRow.Cut
rDest.Insert

--
Don Guillett
SalesAid Software

"BluzDude" wrote in message
...
In the following code, how would I change the "paste" operation in the
"Done"
worksheet to an "insert" operation? I want the inserted data to appear
above
the existing data in the "Done" worksheet. The existing data starts in row
4
of that worksheet.

Public Sub CutToDone()
Dim rToCut As Range
Dim rDest As Range
With Sheets("Jobs")
On Error Resume Next
Set rToCut = .Range("F4:F" & .Range("F" & _
.Rows.Count).End(xlUp).Row).SpecialCells( _
xlCellTypeConstants)
On Error GoTo 0
End With
If Not rToCut Is Nothing Then
With Sheets("Done")
Set rDest = .Range("A" & _
.Rows.Count).End(xlUp).Offset(1, 0)
End With
With rToCut.EntireRow
.Copy Destination:=rDest
.Delete
End With
End If
End Sub