This is the code I am using, I just can't figure out how to get the new
worksheets to be the same as the first worksheet:
Sub CreateWorksheetsByDate()
Dim myDate As Variant
Dim iCtr As Long
Dim myStr As String
Dim testwks As Worksheet
Dim SH As Worksheet
Set SH = ActiveSheet
myDate = InputBox(Prompt:="Enter the first day of the Month you want to
Create", _
Default:=Format(Date, "mm/dd/yy"))
'Default:=Format(Date, "mmmm dd, yyyy"))
If IsDate(myDate) = False Then
MsgBox "Please try later"
Exit Sub
End If
Application.ScreenUpdating = False
myDate = CDate(myDate)
For iCtr = DateSerial(Year(myDate), Month(myDate), 1) _
To DateSerial(Year(myDate), Month(myDate) + 1, 0)
Select Case Weekday(iCtr)
'Case Is = vbSunday, vbSaturday (Does all days, remove ' does
only weekdays)
'do nothing
Case Else
'myStr = Format(iCtr, "yyyy_mm_dd_dddd")
myStr = Format(iCtr, "dddd mm-dd")
Set testwks = Nothing
On Error Resume Next
Set testwks = Worksheets(myStr)
On Error GoTo 0
If testwks Is Nothing Then
Set testwks _
= Worksheets.Add(after:=Worksheets(Worksheets.Count))
testwks.Name = myStr
End If
End Select
Next iCtr
Worksheets("Setup").Activate
Application.ScreenUpdating = True
End Sub
Thanks!