Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Gary ... (Happy afternoon)
Ok ... I need a slight tweak ... I have 2 WorkSheets in front of the 12 (Mmm) Tabs that I do not want impacted by this Macro ... Thanks ... Kha "Gary''s Student" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
easy:
Private Sub Workbook_Open() For i = 3 To 14 ActiveWorkbook.Sheets(i).Tab.ColorIndex = 50 Next j = Month(DateValue(Now())) + 2 ActiveWorkbook.Sheets(j).Tab.ColorIndex = 6 End Sub only two lines changed -- Gary''s Student gsnu200710 "Ken" wrote: Gary ... (Happy afternoon) Ok ... I need a slight tweak ... I have 2 WorkSheets in front of the 12 (Mmm) Tabs that I do not want impacted by this Macro ... Thanks ... Kha "Gary''s Student" wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Gary ... (Hi)
Yes ... almost there ... However, I would also like Excel to select the appropriate Mmm Tab when opening (part of original post) ... (ie: someone opens ... they open to current Mmm Tab) ... Thanks ... Kha "Gary''s Student" wrote: easy: Private Sub Workbook_Open() For i = 3 To 14 ActiveWorkbook.Sheets(i).Tab.ColorIndex = 50 Next j = Month(DateValue(Now())) + 2 ActiveWorkbook.Sheets(j).Tab.ColorIndex = 6 End Sub only two lines changed -- Gary''s Student gsnu200710 "Ken" wrote: Gary ... (Happy afternoon) Ok ... I need a slight tweak ... I have 2 WorkSheets in front of the 12 (Mmm) Tabs that I do not want impacted by this Macro ... Thanks ... Kha "Gary''s Student" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculate the first day of the month for the current month? | Excel Discussion (Misc queries) | |||
Change Cell Color if in current Month | Excel Worksheet Functions | |||
Current Month | Excel Worksheet Functions | |||
identifying current month | Charts and Charting in Excel | |||
Current Month Query | Excel Worksheet Functions |