View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Selecting previous worksheet

d$ = Format(Now, "dd.mm.yy")
Sheets.Add
Sheets("sheet1").Select
Sheets("Sheet1").Name = d$
Sheets(d$).Previous.Select

--
Regards,
Tom Ogilvy


"Carolyne" wrote in message
om...
I'm trying to create a macro that creates a new worksheet named todays
date and copys the whole of the previous sheet into it. I can only
seem to select the specific sheet name does anyone know how to select
the previous sheet.
I have this so far

d$ = Format(Now, "dd.mm.yy")
Sheets.Add
Sheets("sheet1").Select
Sheets("Sheet1").Name = d$

The line below is where i want to select the previous sheet.

Sheets("12.05.04").Select
Cells.Select