Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a Month's Sheets automatically | Excel Programming | |||
Automatically create new sheets... | Excel Programming | |||
Can I create new sheets automatically in a formula? | Excel Worksheet Functions | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
have Macro automatically delete and create sheets | Excel Programming |