View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Macro for changing tabs

Duncan,

Here is the solution I posted to your question yesterday.

Dim N As Long
With ThisWorkbook.Worksheets
For N = .Count To 1 Step -1
.Item(N).Name = "Week" & Format(N + 1)
Next N
.Add(befo=.Item(1)).Name = "Week1"
End With

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Duncan J" wrote in message
...
I have a vlookup and other formula's in this macro so I cannot

name the tabs by date.
So I have tabs named week1 week2 week3 week4 week5 ect then

after that have other tabs
Top Stockweek1 Topstock week2. ect I need a something that will

change week1 to week 2, week2 to week3 and so on and insert a
blank sheet name week1. So I can paste the new data in and run
the macro's.
I had a few suggestion but so far they haven't worked.
Thanks again!!