Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
One for every month
After using this code to create a worksheet for each month of the year in an
existing workbook and saving it, 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 Saving it created a new workbook with the same name but the extension .xlsm and the Excel icon has a yellow overlay with an exclamation mark. Does this mean that something is wrong with the workbook? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
One for every month
XL 2007 has different file extensions. .xlsm is a macro enabled workbook. If
you are not on 2007 then you must have the compatability pack installed. At which point you can up convert files to XL 2007 with Save As. -- HTH... Jim Thomlinson "DonV" wrote: After using this code to create a worksheet for each month of the year in an existing workbook and saving it, 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 Saving it created a new workbook with the same name but the extension .xlsm and the Excel icon has a yellow overlay with an exclamation mark. Does this mean that something is wrong with the workbook? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel to make the days cary over month to month automaticly | New Users to Excel | |||
Excel 2003 month to month data change grid | Excel Discussion (Misc queries) | |||
copy worksheet from previous month and rename to current month | Excel Programming | |||
transfer cell $ amount to other sheet month-to-month without overc | Excel Discussion (Misc queries) | |||
Fill column with dates of month depending on month in A1 | Excel Programming |