Excel spreadsheet re nameing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an excel spreadsheet, the worksheets are named in date order by day (3 months) I want to be able to change the first 1 and have all the others change to the subsequent dates, is this possible
 
Here is a sample macro that uses the following format for each of th
tab names *Jan 1, 2004*. Change the name of the first sheet of th
workbook to the first date you want (use the same format as the bolde
date above) and then run the macro below.


Code
-------------------

Public Sub ChangeDates()

Sheets(1).Select
vDate = CDate(ActiveSheet.Name)

For i = 2 To Sheets.Count

vDate = vDate + 1
Sheets(i).Name = Format(vDate, "mmm d, yyyy")

Next i

End Su
-------------------




Rolli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top