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.