Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I move a document from "recent items" to "documents" John Gerke in Central Oregon New Users to Excel 1 March 2nd 08 08:31 AM
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 01:57 PM
Any way to use toolbar button to delete cells and move cells "up"? Texas-Ron Excel Discussion (Misc queries) 2 April 7th 07 06:33 PM
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc Bob Reynolds[_2_] Excel Programming 0 March 4th 04 08:52 PM


All times are GMT +1. The time now is 03:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"