Dynamically setting worksheet tab colors
How do I make the worksheet tab color be the same as the color of a cell in
another worksheet? Thx for your help, John |
Dynamically setting worksheet tab colors
Sub colortabbasedoncellvalue()
Sheets("Sheet22").Tab.ColorIndex = _ Sheets("sheet25").Range("d3").Interior.ColorIndex End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "John" wrote in message ... How do I make the worksheet tab color be the same as the color of a cell in another worksheet? Thx for your help, John |
Dynamically setting worksheet tab colors
Looks good, but where do I put this routine?
"Don Guillett" wrote: Sub colortabbasedoncellvalue() Sheets("Sheet22").Tab.ColorIndex = _ Sheets("sheet25").Range("d3").Interior.ColorIndex End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "John" wrote in message ... How do I make the worksheet tab color be the same as the color of a cell in another worksheet? Thx for your help, John |
Dynamically setting worksheet tab colors
Understand. And this works fine if I execute the macro after changing the
color of the cell. But I want the change to take place as soon as I change the color of the cell. Sooo, it seems to do what I wan if I place the VB routine you suggested in the Sheet25(Sheet25) area with a header of Private Sub Worksheet_SelectionChange(ByVal Target As Range), rather than in Module1. Now whenever I navigate way from the cell after changing its color, the tab on the corresponding sheet changes. Is there a better solution? I'm pretty green in the VB world. Thx for your help, John "Don Guillett" wrote: It's a macro. Put in a module and execute it. -- Don Guillett Microsoft MVP Excel SalesAid Software "John" wrote in message ... Looks good, but where do I put this routine? "Don Guillett" wrote: Sub colortabbasedoncellvalue() Sheets("Sheet22").Tab.ColorIndex = _ Sheets("sheet25").Range("d3").Interior.ColorIndex End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "John" wrote in message ... How do I make the worksheet tab color be the same as the color of a cell in another worksheet? Thx for your help, John |
All times are GMT +1. The time now is 09:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com