cvincent
Board Regular
- Joined
- Aug 28, 2011
- Messages
- 66
I am not an expert, but managed to create these two vbas that work fine, except that it loops after every single cell change, and I probably need to combine into one vba. I only need to look at C54:D54. The tab color change feature needs to look at cells C54:D54 (not A56), and if the value is "HOLD", color the tab blue, and otherwise do not color the tab. Cell A56 simply says (if C54:D54 = "HOLD", "HOLD","") - I think I can bypass that and just look at C54:D54 (a dropdown selection).
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C54:D54")) Is Nothing Then
Application.Run "RemoveCover"
End If
End Sub
Private Sub Worksheet_Calculate()
If Range("A56").Value = "" Then
Me.Tab.ColorIndex = -4142 ' No Color
Else
Me.Tab.ColorIndex = 23 ' Blue
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C54:D54")) Is Nothing Then
Application.Run "RemoveCover"
End If
End Sub
Private Sub Worksheet_Calculate()
If Range("A56").Value = "" Then
Me.Tab.ColorIndex = -4142 ' No Color
Else
Me.Tab.ColorIndex = 23 ' Blue
End If
End Sub