I have code like this, but it does not change to the right color,
Code:If Sheets("Sheet3").Range("S45").Value > "0.00" Then Sheets("Sheet3").Tab.ColorIndex = 5 '-----Change Tab Color (Blue) Sheets("Sheet1").Tab.ColorIndex = 5 '-----Change Tab Color (Blue) > 0.00% Sheets("Sheet2").Tab.ColorIndex = 5 '-----Change Tab Color (Blue) End If If Sheets("Sheet3").Range("S45").Value > "3.00%" Then Sheets("Sheet3").Tab.ColorIndex = 4 '-----Change Tab Color (Green) Sheets("Sheet1").Tab.ColorIndex = 4 '-----Change Tab Color (Green) > 3.00% Sheets("Sheet2").Tab.ColorIndex = 4 '-----Change Tab Color (Green) End If If Sheets("Sheet3").Range("S45").Value < "0.00" Then Sheets("Sheet3").Tab.ColorIndex = 46 '-----Change Tab Color (Orange) Sheets("Sheet1").Tab.ColorIndex = 46 '-----Change Tab Color (Orange) < 0.00% Sheets("Sheet2").Tab.ColorIndex = 46 '-----Change Tab Color (Orange) End If If Sheets("Sheet3").Range("S45").Value < "-3.00%" Then Sheets("Sheet3").Tab.ColorIndex = 3 '-----Change Tab Color (Red) Sheets("Sheet1").Tab.ColorIndex = 3 '-----Change Tab Color (Red) < -3.00% Sheets("Sheet2").Tab.ColorIndex = 3 '-----Change Tab Color (Red) End If End Sub
Bookmarks