User select row?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top