Delete "Cut" row on move...?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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(xlUp).Offset(1, 0)

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

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

Gord Dibben Excel MVP
 
Thanks much Gord.

I was sort of hoping for something like:

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top