Macro to copy to any active sheet

K

Kat Wood

I am recording a macro to copy a cell in a specific sheet to whatever cell
the cursor is on. I am successful as long as I run the macro in the sheet
where I recorded it, but if I need to run it on another sheet, it of course
is going back to the sheet where it was recorded due to the Sheets("Sheet
Name").Select command.

How do I modify the code so it will copy to whichever sheet the cursor is on?
 
G

Gord Dibben

Do not need to select and copy.

This will do the same thing.............

ActiveCell.Value = Sheets("specificsheet").Range("A1").Value

Edit to suit your sheetname and range


Gord Dibben MS Excel MVP
 

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

Top