Option Explicit
Sub AddSheets()
Dim mn As Long
Dim dy As Date
Dim ws As Worksheet
Do
mn = InputBox("Enter Month (0 to quit)")
Loop Until mn >= 0 And mn <= 13
If mn = 0 Then Exit Sub
For dy = DateSerial(Year(Date), mn, 1) To DateSerial(Year(Date), mn + 1,
0)
Set ws = Worksheets.Add(after:=Worksheets(Worksheets.Count))
ws.Name = Format$(dy, "DD_MMM")
Next
End Sub
"PumaMan" <(E-Mail Removed)> wrote in message
news:70EABC17-2410-4025-8327-(E-Mail Removed)...
> I was wondering if there's a procedure to automatically add sheets for the
> days in a month automatically? The format just needs the month and day,
> but
> I'd like to be able to do it with VBA.
>
> Thanks!
|