![]() |
Macro to copy to any active sheet
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? -- Kat Wood OHSU ITG |
Macro to copy to any active sheet
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 On Thu, 30 Oct 2008 15:44:00 -0700, Kat Wood wrote: 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? |
All times are GMT +1. The time now is 09:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com