Thread
:
Worksheet name
View Single Post
#
3
Posted to microsoft.public.excel.misc
curiosity_killed_the_cat[_2_]
external usenet poster
Posts: 11
Worksheet name
Thankks Don
Could you explain a little on how it works. I pasted your code into vba but
nothing happens. Do i need to put sheet names into the code?
thanks
"Don Guillett" wrote:
try this
Sub namesheets()
For i = Sheets.Count To 1 Step -1 'or 24 to 1 step -1
Sheets(i).Name = Format(DateSerial(Year(Date), i, 1), "mmm yy")
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"curiosity_killed_the_cat"
m wrote in message
...
Is there a method of using a formula/macro to name a worksheet and have
that
worksheet name change according to the month?
i have a workbook with 24 worksheets that are named as Nov 2007 and so on.
Using the computers time and date settings to change a worksheet name once
that month has expired ie on Dec 1 2007, change the worksheet Nov 2007
would
change to Dec 2009, therby keeping 24 worksheets with the next 24 months
as
sheetnames.
thanks
Reply With Quote
curiosity_killed_the_cat[_2_]
View Public Profile
Find all posts by curiosity_killed_the_cat[_2_]