Hello,
I'm trying to get a macro to work that will make tabs visible based on a date entered into cell "c2" of each worksheet. There is a new worksheet for each day, and I'd like today's sheet's tab to be visible as well as the sheet's tabs for the upcoming 7 days, and then hiding any previous day's tabs.
So far I have this...
[code]
Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In Worksheets
If (ws.Range("C2") < Date And ws.Range("C2") > (Date + 7)) Then
ws.Visible = False
End If
Next ws
End Sub
[code]
...but nothing is hiding. It will hide if I have "<> Date", but then only today's tab will show, and that isn't helpful. Any suggestions will be greatly appreciated!
Thanks!
Bookmarks