ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I make tab colors dependant on cell entries? (https://www.excelbanter.com/excel-programming/382700-can-i-make-tab-colors-dependant-cell-entries.html)

Thomas

Can I make tab colors dependant on cell entries?
 
I'm using a spreadsheet with multiple tabs. I'd like to have the tabs all
red until the appropriate fields have been filled in on the sheet. Once this
is accomplished I'd like to have the tabs turn green. Is this possible?

Gary''s Student

Can I make tab colors dependant on cell entries?
 
Make all the tabs red manually.

Put this in worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = "" Or Range("A2").Value = "" Then
Exit Sub
End If
ActiveWorkbook.ActiveSheet.Tab.ColorIndex = 4
End Sub

In this example, once BOTH A1 and A2 have been filled in the tabe turns green.
--
Gary''s Student
gsnu200704


"Thomas" wrote:

I'm using a spreadsheet with multiple tabs. I'd like to have the tabs all
red until the appropriate fields have been filled in on the sheet. Once this
is accomplished I'd like to have the tabs turn green. Is this possible?


Thomas

Can I make tab colors dependant on cell entries?
 
Thank you for responding so quickly... but I must confess, I'm rather green
at excel at this point, not complete novice, but you lost me at put this in
worksheet code. LOL

Where on the worksheet do I enter it? Do I need a certain syntax when I
type it in? Do I have to type it in for each active sheet, or can I copy and
past it into the sheets (I have 46 active sheets in the workbook).

Thanks again!

Thomas

"Thomas" wrote:

I'm using a spreadsheet with multiple tabs. I'd like to have the tabs all
red until the appropriate fields have been filled in on the sheet. Once this
is accomplished I'd like to have the tabs turn green. Is this possible?



All times are GMT +1. The time now is 09:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com