View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
IC[_2_] IC[_2_] is offline
external usenet poster
 
Posts: 26
Default Moving row between worksheets

"Steve1820" wrote in message
...

This is something which is bugging me, and I'm sure is simple but...

The user highlights a cell, then presses a button located at the top of
a worksheet, I then want to take that entire row and copy it to another
worksheet inserting it at the top of the page whilst deleting the old
row on the other worksheet

So my plan was

ActiveCell.EntireRow.Copy
Worksheets("Completed").Activate 'the other sheet
Range("A1").Select
ActiveCell.Insert Shift:=xlShiftDown
WorkSheets("Active").Activate 'back to the original
ActiveCell.EntireRow.Delete Shift:=xlShiftUp

I get Run-time error '1004' Select method of Range class failed after
selecting the other sheet, I've tried many other ways of selecting top
left, Cells, Rows etc with no luck. I have to state top left as it may
not be there due to users selecting other cells for post updates and it
may not have the focus.

What am I overlooking??


I tried this on a new worksheet and it worked fine so the problem must be
elsewhere.

Ian