Hello-
I have a workbook in which I have a sheet labeled "Week 1" and a hidden sheet labeled "Template." The user enters a beginning date and an end date in a dialog box. I am using a date format, "ww," to determine the number of weeks between those dates. I then subtract the one week out to account for the "Week 1" sheet. I need to take that integer and create a loop to copy the hidden template sheet that number of times. The desired result is a workbook with tabs labeled "Week 1" through "Week x," determined by a beginning date and an end date. It looks something like this but I don't have it in front of me.
Sub IDontKnowWhatImDoing
Dim a as integer
Dim b as integer
Dim c as integer
a = Format(txtStart.Text,ww)
b = Format(txtEnd.Text,ww)
c = (b-a)-1
'It works up to this point. c calculates. Here's where I get confused. I feel 'like it has do with not linking the counter up to the sheets
For d = 2 to c
Worksheets("Template").Visible = True
Worksheets("Template").Copy
Worksheets("Template").Visible = False
Next d
End Sub
Any help is appreciated. Thank you.
Bookmarks