Auto Chg Tab Color vs Current Month
Hi Ken:
Just put your sheets in order with jan as the first and dec as the last.
Then insert this in Workbook code:
Private Sub Workbook_Open()
For i = 1 To 12
ActiveWorkbook.Sheets(i).Tab.ColorIndex = 50
Next
j = Month(DateValue(Now()))
ActiveWorkbook.Sheets(j).Tab.ColorIndex = 6
End Sub
This approach will work regardless of the date format chosen for the tabs.
REMEMBER: workbook code
--
Gary''s Student
gsnu200710
"Ken" wrote:
Excel2003 ... I have 12 WorkSheets (1 for each month) ... WorkSheets are
titled ... Jan, Feb, Mar ... etc etc (all are Mmm)
All WorkSheet Tabs are formatted same color ... Is it possible to have Tab
of Current Month "selected" & "set to a different color" upon opening of the
WorkBook?
ie: All Tabs are GREEN ... & it is March ... Upon opening the WorkBook I
would like "Mar" Tab selected ... & ... I would like "Mar" Tab to be set @ a
different color ... say YELLOW. (Of course when April comes "Mar" Tab now
needs to go back to GREEN & "Apr" Tab now needs to be YELLOW)
I am assuming if above is possible it will require a Macro ... If so, since
I know nothing about Marcros (I record only) ... then I will need a Macro
that I can easily edit to suit my application ...
As always ... my extended appreciation to those of you that continually
monitor, support & provide so much guidance on these boards ... Thanks ...
Kha
|