Dont bother y'all. Figured it out!
Its always nice to see a solution to a problem.
Anywho, I came up with this:
- Sub createbooks()
-
Dim x As Integer
-
Dim i As Integer
-
-
For i = 1 To 11
-
If i = ActiveWorkbook.Sheets.Count Then
-
ActiveWorkbook.Sheets.Add
-
End If
-
Next
-
-
For x = 1 To ActiveWorkbook.Sheets.Count
-
Sheets(x).Name = MonthName(x)
-
Next
-
End Sub
Would be nice to get that in one loop, but I figure this is better as it takes advantage of the way Excel inserts a sheet before the current one.
The first For loop only goes to eleven, because a workbook must contain at least one visible worksheet.
Gaz.