Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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?


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
Need macro to copy active sheet to a new workbook Bill_S Excel Programming 1 May 4th 08 09:43 PM
copy name from active sheet to cell - using macro or function dymek Excel Worksheet Functions 2 October 2nd 06 12:32 PM
Macro to copy active sheet and email to distribution list bsnapool[_8_] Excel Programming 1 July 11th 06 07:19 PM
Copy my active sheet to a new sheet and open with an input form Brad Withrow Excel Programming 0 April 6th 06 03:56 AM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM


All times are GMT +1. The time now is 06:20 PM.

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"