How to modify macro for monthly sheets
Sorry, I was only focused on the Month. if you wanted next year
set sh = Activesheet
For i = 1 To 11
sh.Copy After:=Sheets(Sheets.Count)
sName = format(DateSerial(year(date)+1,i+1,1),"mmmyy")
ActiveSheet.Name = sName
Next
Application.ScreenUpdating = True
End Sub
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
Sub MasterMonthlyCopy()
Dim i As Integer
Dim sName as String
Dim sh as Worksheet
Application.ScreenUpdating = False
set sh = Activesheet
For i = 1 To 11
sh.Copy After:=Sheets(Sheets.Count)
sName = format(DateSerial(year(date),i+1,1),"mmm")
ActiveSheet.Name = sName & Format(Date, "yy")
Next
Application.ScreenUpdating = True
End Sub
--
Regards,
Tom Ogilvy
"GregR" wrote in message
oups.com...
I have this macro code which does not work
Sub MasterMonthlyCopy()
Dim i As Integer
Application.ScreenUpdating = False
For i = 1 To 11
ActiveSheet.Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = Application.GetCustomListContents(3) &
Format(Date, "yy")
Next
Application.ScreenUpdating = True
End Sub
What I am trying to accomplish is copy Sheet(1) 11 times and rename the
copied sheets to Feb06, Mar06 etc. TIA
Greg
|