View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default Creating new sheet named one week newer that active sheet

Dave
One way:
Sub TestDates()
Dim NewShtName As String
NewShtName = Format(CDate(ActiveSheet.Name) + 7, "mmm dd")
Worksheets.Add(After:=Sheets(Sheets.Count)).Name = NewShtName
End Sub
HTH Otto
"davegb" wrote in message
...
I have a weekly status spreadsheet. Each week, I create a new sheet
with Monday's date on it. Then put in the necessary fields and
formatting. I'm writing a macro to do this (talk about lazy!). If I
have a sheet named "Mar 17", how can I use that to create a sheet
named "Mar 24". I already copied the sheet name into a cell, and XL
recognized it as a date, so I could just copy the name, paste it to a
cell, add 7, then use that as the name for the new sheet. But is there
a more direct way of doing this?
Thanks in advance.