![]() |
Change tab colors via programming
I have created a calendar with separate sheets per week (so....52 sheets for
a year). I use conditional formatting to color the current day on the sheet but I would like to color the tab as well. I want the current days' tab to be yellow. I have tried several things but nothing works. Not sure where to put the code (right click the tab and "View Code" I think, but not sure). I want it to activate automatically. Is this possible? -- Bob R |
Change tab colors via programming
Colored tabs were introduced in Excel 2002 (XP). You can't change the
colors in earlier versions. To change a tab programmatically, use Worksheets("Sheet2").Tab.ColorIndex = 3 'red Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Mon, 5 Jan 2009 13:06:03 -0800, Bob wrote: I have created a calendar with separate sheets per week (so....52 sheets for a year). I use conditional formatting to color the current day on the sheet but I would like to color the tab as well. I want the current days' tab to be yellow. I have tried several things but nothing works. Not sure where to put the code (right click the tab and "View Code" I think, but not sure). I want it to activate automatically. Is this possible? |
All times are GMT +1. The time now is 09:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com