View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Dr. Darrell Dr. Darrell is offline
external usenet poster
 
Posts: 74
Default I want to change the name of (52) worksheets.

Bob:

Thank you very much, this saved me a lot of time and effort.

Darrell

"Bob Phillips" wrote:

No, it is a multiplier so as to increment each by 7, 7, 14, 21, etc., not 8,
9, 10

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Dr. Darrell" wrote in message
...
Bob:

Should the Asterisk be a plus sign?

************************************************** ********
Worksheets(i).Name = "Week Ending " & Format(start + (i - 1) * 7,
"m-d-yy")
************************************************** ********

"Bob Phillips" wrote:

Dim i As Long
Dim start As Date
With ActiveWorkbook
start = DateValue(Replace(.Worksheets(1).Name, "Week Ending ",
""))
For i = 2 To .Worksheets.Count
Worksheets(i).Name = "Week Ending " & Format(start + (i - 1)
*
7, "m-d-yy")
Next i
End With

End Sub


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Dr. Darrell" wrote in message
...
I have copied a workbook that I used in 2006 for a simalar use in 2007.
The
workbook has 52 worksheets which names reflect the Sunday at the end of
the
week; (Week Ending 1-8-07, Week Ending 1-15-07, Week Ending 1-22-07...)

I would like to add a function that ties all the Tabs to the first Tab.
When
I change the name of the first Tab to "Week Ending 1-7-07" I would like
the
remaining 51 Tabs to change accordingly.

Can someone give me a suggestion?

Darrell