Hello all,
Yesterday we were trying to color the sheet tab that matched the date -1 day while trying to return no color for the previous day in Excel 2002. I modified the code and placed these to lines in:
Sheets(Format(Date - 2, "mmmd")).Activate
ActiveSheet.Tab.ColorIndex = xlNone
So the whole code is:
Private Sub Workbook_Open()
On Error Resume Next
On Error GoTo 0
Sheets(Format(Date - 2, "mmmd")).Activate
ActiveSheet.Tab.ColorIndex = xlNone
Sheets(Format(Date - 1, "mmmd")).Activate
ActiveSheet.Tab.ColorIndex = 3
Range("C15").Select
End Sub
I want to thank everyone who helped out.
Mike
Bookmarks