Thread
:
Conditional Formatting a tab color
View Single Post
#
3
Posted to microsoft.public.excel.programming
Patrick Molloy
external usenet poster
Posts: 1,049
Conditional Formatting a tab color
the idea is sound enough. But how will the code be forced? #
You're on some other sheet, so a sheet change or such, probably isn't
needed.
I suggest the the workbook's caluculate event would be good. in the IDE
select ThisWorkbook's code page and paste your code into :
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
If Sheets("Replacement").Range("E44").Value 0 Then
Sheets("Replacement").Tab.ColorIndex = 4
Else
Sheets("Replacement").Tab.ColorIndex = -4142
End If
End Sub
to test this , i set E44 to point at at cell in sheet1. when is set the
sheet1 cell's value to a positive number , the tab went green.
The con could be that you'd either need calc mode on automatic, so set a
change event to calc the cell in the Replacement sheet.
"Rhino V" <Rhino
wrote in message
...
I know I'm missing something. I'm using Excel 2007 but a 2003 compatible
file for the versatility of my clients. I have a 7 sheet workbook that
feeds
data into the first sheet. So as to know which sheets have been modified
I'm
trying to use a sequence I found here. Under [View Code] of my tab called
"Replacements" I inserted
Sub Tab_Color()
If Sheets("Replacement").Range("E44").Value 0 Then
Sheets("Replacement").Tab.ColorIndex = 4
Else
Sheets("Replacement").Tab.ColorIndex = -4142
End If
End Sub
where E44 has a formula for the whole sheet and is the cell that will
determine if the tab should change color or not. I just want to visually
see
or be clued "if there's something there" while I'm on any other tab. And
for
it to default back if no calculations are done on that sheet.
Using the above sequence doesn't do anything to the tab color when E44
becomes greater than 0 in its calculation. Please help...
Reply With Quote
Patrick Molloy
View Public Profile
Find all posts by Patrick Molloy