![]() |
Delete "Cut" row on move...?
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(xlU p).Offset(1, 0) BUT, this method fails to delete the row on the active sheet. Can this be done? Thanks in advance. |
Delete "Cut" row on move...?
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. |
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. |
All times are GMT +1. The time now is 01:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com