Hi
I have a cell that change color only red(3) and green(4) and i want the sheet tab color to be the same. So i use this code but the if does not work. it seems the it does not pick up the cell color. The else works.
I have a cell that change color only red(3) and green(4) and i want the sheet tab color to be the same. So i use this code but the if does not work. it seems the it does not pick up the cell color. The else works.
Code:
[COLOR=#000000][SIZE=2][FONT=Arial][B]Private Sub Worksheet_Change(ByVal Target As Range)
If Range("D1").Interior.ColorIndex = 4 Then
Me.Tab.ColorIndex = 4
Else
Me.Tab.ColorIndex = 3
End If
End Sub[/B][/FONT][/SIZE][/COLOR]