crystaljulius
New Member
- Joined
- Jul 22, 2022
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hi, i am an accountant and need the Tab color to change based on a cell value with a formula automatically. I currently have the below code. It works but only when I click on to the Tab. Can this be changed so that when I update my master sheet it automatically changes the tab color without clicking on the tab.
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("F18").Value <> 0 Then
Me.Tab.ColorIndex = 4
Else
Me.Tab.ColorIndex = xlColorIndexNone
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("F18").Value <> 0 Then
Me.Tab.ColorIndex = 4
Else
Me.Tab.ColorIndex = xlColorIndexNone
End If
End Sub