Not sure I understood your problem righ but perhaps you could do something
like this.
Sub Auto_Open()
'
Dim i As Integer
Application.DisplayAlerts = False
For i = Sheets.Count To 12 Step -1
If i > 13 Then
Sheets(i).Delete
End If
Next i
Application.DisplayAlerts = True
End Sub
This assumes that the oldest sheet is the last one in the row of sheets.
"AdministrationIntern" <[email protected]>
wrote in message news:[email protected]...
>I am creating an attendance database for my company.
>
> There are 19 different departments in the company and each manager tallies
> his/her own employee attendances.
>
> I had a spreadsheet set up, but it wasn't on a rolling calendar basis.
> Then,
> I was going to have the managers delete old months, but that would most
> likely mess with the formulas.
>
> So the new spreadsheet needs to be on a rolling calendar basis, so that
> when
> a new month comes up, the previous month from last year will drop off in
> calculations.
>
> My file has three worksheets, one titled "Summary", one titled "Details"
> and
> the last "Setup".
>
> The Summary page should tally the total absences from the year for each
> employee. It serves as a quick view. The Details page is where Managers
> enter information about each individual employee, each day they are late,
> or
> don't show up for work. What I would like to do on the set-up page is to
> create a reference start date, so the Details page can reference this and
> add
> 365 days...and sum the number of absences within that range. I don't know
> how
> to do this. How should the sheets be set up. Can someone please help?
>
> Thank you.
>
Bookmarks