Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 11
Default Selecting An Entire Row.

Hi,

My simple macro is supposed cut a line from Sheet 1 and paste it to the
first available Row in Sheet 2, and then delete the original line from Sheet
1. It would work, I think, if I could get past the first line. The first
line is:

Worksheets(1).ActiveCell.EntireRow.Select

I get message:

Run-time error `438':
Object doesn't support this property or method.

(My plan is to have user activate this macro with a hot key, like Ctrl +
R., as he is scrolling through sheet and finds a line that should be moved.)

What should the syntax be to select the row where the cursor is??

Thank you,

Sam


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Selecting An Entire Row.

I think you want to drop the first part of that line of code. this should be
close to what you want...

with activecell.entirerow
.copy sheets("Sheet2").cells(rows.count, "A").end(xlUp).offset(1,0)
.delete
end with

--
HTH...

Jim Thomlinson


"Sam" wrote:

Hi,

My simple macro is supposed cut a line from Sheet 1 and paste it to the
first available Row in Sheet 2, and then delete the original line from Sheet
1. It would work, I think, if I could get past the first line. The first
line is:

Worksheets(1).ActiveCell.EntireRow.Select

I get message:

Run-time error `438':
Object doesn't support this property or method.

(My plan is to have user activate this macro with a hot key, like Ctrl +
R., as he is scrolling through sheet and finds a line that should be moved.)

What should the syntax be to select the row where the cursor is??

Thank you,

Sam



  #3   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 11
Default Selecting An Entire Row.

I think you want to drop the first part of that line of code. this should
be
close to what you want...

with activecell.entirerow
.copy sheets("Sheet2").cells(rows.count, "A").end(xlUp).offset(1,0)
.delete
end with

Jim Thomlinson


Yes, that works.
Thank you.



"Sam" wrote:

Hi,

My simple macro is supposed cut a line from Sheet 1 and paste it to
the
first available Row in Sheet 2, and then delete the original line from
Sheet
1. It would work, I think, if I could get past the first line. The first
line is:

Worksheets(1).ActiveCell.EntireRow.Select

I get message:

Run-time error `438':
Object doesn't support this property or method.

(My plan is to have user activate this macro with a hot key, like Ctrl
+
R., as he is scrolling through sheet and finds a line that should be
moved.)

What should the syntax be to select the row where the cursor is??

Thank you,

Sam





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
Row-Entire row changes color (and stays) selecting first entry Harry's GMail World Excel Discussion (Misc queries) 3 May 11th 08 09:56 AM
i want to highlight entire row when selecting a cell in that row Dino Excel Discussion (Misc queries) 12 March 30th 08 03:59 AM
Selecting entire rows contents GB900180 Excel Programming 3 January 17th 06 07:00 AM
select cell rather selecting entire row ilyaskazi[_99_] Excel Programming 1 November 25th 05 02:48 PM
problem selecting entire column mark kubicki Excel Programming 1 February 25th 04 11:00 PM


All times are GMT +1. The time now is 12:01 AM.

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

About Us

"It's about Microsoft Excel"