View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier[_3_] Roger Govier[_3_] is offline
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.