Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default User select row?

Hello all,

I want to make a really simple macro:

Rows("42:42").Select 'This line is where the problem lies.
Selection.Copy
Rows("2:2").Select
ActiveSheet.Paste


Looks easy enough, right? I want to copy one line and paste it somewhere else.

The first line though, I'd like to make it user dependent. So if the user
click on row 42 or row 52 or 102 it doesn't matter.

please help!
rudini
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default User select row?

If I understand your question, just omit the line
Rows("42:42").Select


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"rudini" wrote in message
...
Hello all,

I want to make a really simple macro:

Rows("42:42").Select 'This line is where the problem
lies.
Selection.Copy
Rows("2:2").Select
ActiveSheet.Paste


Looks easy enough, right? I want to copy one line and paste it
somewhere else.

The first line though, I'd like to make it user dependent. So
if the user
click on row 42 or row 52 or 102 it doesn't matter.

please help!
rudini



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default User select row?

ActiveCell.EntireRow.copy Rows("2:2")

Should do it.

--
Regards,
Tom Ogilvy


"rudini" wrote in message
...
Hello all,

I want to make a really simple macro:

Rows("42:42").Select 'This line is where the problem lies.
Selection.Copy
Rows("2:2").Select
ActiveSheet.Paste


Looks easy enough, right? I want to copy one line and paste it somewhere

else.

The first line though, I'd like to make it user dependent. So if the user
click on row 42 or row 52 or 102 it doesn't matter.

please help!
rudini



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default User select row?

holy smokes!

Thanks Tom, for my purposes i used:

ActiveCell.EntireRow.copy
Selection.Copy
Rows("2:2").Select
ActiveSheet.Paste

That enables me to select any row (the left hand most column with the
numbers) and hit crtl+d, and bam! it does exactly what i need! thank you guys!


"Tom Ogilvy" wrote:

ActiveCell.EntireRow.copy Rows("2:2")

Should do it.

--
Regards,
Tom Ogilvy


"rudini" wrote in message
...
Hello all,

I want to make a really simple macro:

Rows("42:42").Select 'This line is where the problem lies.
Selection.Copy
Rows("2:2").Select
ActiveSheet.Paste


Looks easy enough, right? I want to copy one line and paste it somewhere

else.

The first line though, I'd like to make it user dependent. So if the user
click on row 42 or row 52 or 102 it doesn't matter.

please help!
rudini




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
how do i lock an autoshape so that a user cannot select it Jack Excel Discussion (Misc queries) 1 February 24th 08 04:39 PM
How can I allow a user to select more than 1 drop down item? stlblackbeltsmom Excel Worksheet Functions 2 December 18th 06 05:30 PM
allow user to select folder jbhoop Excel Discussion (Misc queries) 3 January 3rd 06 10:10 PM
List macros for user to select... ali Excel Programming 3 December 29th 03 12:59 PM


All times are GMT +1. The time now is 05:35 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"