Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Why macro runs on the same sheet?

I have recorded a macro, when i run it on other sheet, it runs on the same
sheet where it was created.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Why macro runs on the same sheet?

Hi

When the macro recorder ran, it will have used reference like

Sheets("Sheet1").Range("A1")
referring to a specific sheet location, hence it would carry out the tasks
on that sheet.
If you change all specific references to Sheets("Sheet1") (or whatever sheet
name it refers to)
to
ActiveSheet.Range("A1) etc
then it will run on whichever sheet is active at the time you run the macro.

--
Regards
Roger Govier

"Harshad" wrote in message
...
I have recorded a macro, when i run it on other sheet, it runs on the same
sheet where it was created.


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
I need a macro that runs other macros until P5=28 Jeff Excel Discussion (Misc queries) 6 May 7th 08 11:44 PM
One macro runs then it auto runs another macro PG Excel Discussion (Misc queries) 2 September 1st 06 09:30 PM
User to decide how often a macro runs Deedee Excel Discussion (Misc queries) 2 November 2nd 05 08:42 PM
Macro that runs in the background tomwashere2 Excel Discussion (Misc queries) 0 October 22nd 05 10:40 PM
Which Macro Runs...? Bill Martin Excel Discussion (Misc queries) 7 September 29th 05 12:42 PM


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