Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving row between worksheets
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 o a worksheet, I then want to take that entire row and copy it to anothe worksheet inserting it at the top of the page whilst deleting the ol 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 afte selecting the other sheet, I've tried many other ways of selecting to left, Cells, Rows etc with no luck. I have to state top left as it ma not be there due to users selecting other cells for post updates and i may not have the focus. What am I overlooking?? Regards Steve :confused -- Steve182 ----------------------------------------------------------------------- Steve1820's Profile: http://www.excelforum.com/member.php...fo&userid=1672 View this thread: http://www.excelforum.com/showthread.php?threadid=31927 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving row between worksheets
Ian, Thanks for your reply, following your lead I cut just this section ou and into a new workbook. Unfortunately I had the same problem, i failed on the Range. Given that I'll look into any unusal things that are in my Exce system. Thanks for your help! Stev -- Steve182 ----------------------------------------------------------------------- Steve1820's Profile: http://www.excelforum.com/member.php...fo&userid=1672 View this thread: http://www.excelforum.com/showthread.php?threadid=31927 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving Worksheets using VB | Excel Discussion (Misc queries) | |||
Moving between worksheets | Excel Discussion (Misc queries) | |||
Moving all worksheets | Excel Discussion (Misc queries) | |||
Moving between Worksheets | Excel Programming | |||
Moving worksheets | Excel Programming |