View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Copying the active worksheet to another worksheet in the same work

I would say that the macro has the original sheet name hard-coded due to the
macro recorder steps.

Change any hard-coded name to Activesheet.

i.e. original code Sheets("Sheet1").cells.copy etc.

Change to ActiveSheet.cells.copy etc.


Gord Dibben MS Excel MVP

On Tue, 25 Mar 2008 11:13:02 -0700, queenmaam
wrote:

I am recording a simple macro to insert a new worksheet and copy the content
of the active worksheet to it. Using the macro recorder, it works fine the
first time, but if I try to use the same macro to copy the second sheet (the
one just created) to a third sheet, it still copies from the original (first)
sheet. I can see why that happens, but I'm not sure how to rework the macro
to copy from the active sheet rather than from the original sheet.

The goal is to copy information from one week's sheet to create a sheet for
the next week for the duration of a project.