View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
quartz[_2_] quartz[_2_] is offline
external usenet poster
 
Posts: 441
Default Delete "Cut" row on move...?

Thanks much Gord.

I was sort of hoping for something like:

Range(lngTopRow & ":" & lngBotRow).EntireRow.Cut(Shift:=xlUp) =
Sheets(pcstrSheetERR).Range("A65536").End(xlUp).Of fset(1, 0)

But, I guess it really needs to be done in two moves.

"Gord Dibben" wrote:

quartz

ActiveCell.EntireRow.Cut _
Destination:=Sheets("ERR").Range("A65536").End(xlU p).Offset(1, 0)
ActiveCell.EntireRow.Delete xlShiftUp

Gord Dibben Excel MVP


On Thu, 9 Dec 2004 14:42:13 -0800, quartz
wrote:

It seems as though you should be able to do the following using a single line
of code somehow, but I can't figure it out. Can someone please help figure
out the most efficient method?

Cut the current row (ActiveCell) from the ActiveSheet to the next unused row
in sheet "ERR" AND AT THE SAME TIME delete the empty row created by this
action in the source sheet.

I have tried the following:

ActiveCell.EntireRow.Cut
Destination:=Sheets("ERR").Range("A65536").End(xl Up).Offset(1, 0)

BUT, this method fails to delete the row on the active sheet. Can this be
done?
Thanks in advance.