Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Auto Chg Tab Color vs Current Month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Auto Chg Tab Color vs Current Month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Auto Chg Tab Color vs Current Month

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   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Auto Chg Tab Color vs Current Month

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate the first day of the month for the current month? April S. Excel Discussion (Misc queries) 5 July 27th 05 08:53 PM
Change Cell Color if in current Month Leslie Excel Worksheet Functions 6 June 28th 05 06:17 PM
Current Month Howard Excel Worksheet Functions 6 March 17th 05 05:35 PM
identifying current month Sue Charts and Charting in Excel 2 February 19th 05 07:42 PM
Current Month Query Sunshinegm Excel Worksheet Functions 1 February 15th 05 01:41 AM


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"