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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Moving Worksheets using VB Marie Bayes Excel Discussion (Misc queries) 4 January 18th 07 03:00 PM
Moving between worksheets Damon Excel Discussion (Misc queries) 3 July 7th 06 05:31 PM
Moving all worksheets jerredjohnson Excel Discussion (Misc queries) 1 June 15th 06 06:01 PM
Moving between Worksheets Jim Berglund Excel Programming 5 August 17th 04 06:21 PM
Moving worksheets Excel[_3_] Excel Programming 1 November 24th 03 01:35 AM


All times are GMT +1. The time now is 12:15 PM.

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"