K
kathy
I have the following macro that names the tabs in a workbook by the month and
year.. how do I get the contents of sheet1 to copy with this.. rather than
all of them being blank... also I still want the months on the tabs to be dec
to jan left to right rather than Jan to dec left to right..
ideas?
Sub createmonthsheets()
Dim intTemp
Dim dtTemp As Date
dtTemp = "Jan 2010"
ActiveWorkbook.Sheets.Add Count:=(14 - 1 - ActiveWorkbook.Sheets.Count)
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("m", (intTemp - 2), dtTemp), "mmm-yy")
Next
ActiveWorkbook.Save
End Sub
year.. how do I get the contents of sheet1 to copy with this.. rather than
all of them being blank... also I still want the months on the tabs to be dec
to jan left to right rather than Jan to dec left to right..
ideas?
Sub createmonthsheets()
Dim intTemp
Dim dtTemp As Date
dtTemp = "Jan 2010"
ActiveWorkbook.Sheets.Add Count:=(14 - 1 - ActiveWorkbook.Sheets.Count)
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("m", (intTemp - 2), dtTemp), "mmm-yy")
Next
ActiveWorkbook.Save
End Sub