View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default One for every month

Sub AddSheets()
Dim sh As Worksheet
Dim i As Long

With ActiveWorkbook

Set sh = ActiveSheet
For i = 1 To 12
sh.Copy After:=.Worksheets(.Worksheets.Count)
ActiveSheet.Name = Format(DateSerial(Year(Date), i, 1), "mmmm")
Next i
End With
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"DonV" wrote in message
...
This code worked thank you. However, is it possible to make it copy an
existing sheet and ues it to make the other sheets?

"Bob Phillips" wrote in message
...
Sub AddSheets()
Dim sh As Worksheet
Dim i As Long

With ActiveWorkbook

For i = 1 To 12
Set sh =
.Worksheets.Add(after:=.Worksheets(.Worksheets.Cou nt))
sh.Name = Format(DateSerial(Year(Date), i, 1), "mmmm")
Next i
End With
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"DonV" wrote in message
...
I have created a worksheet that we need to copy and label January through
December, is tere a way to do this automatically?