You may need to have the option of if f3<>0 and f8=0 as well
If you place this in the Workbook Module instead of the worksheet module, the code will work for all active sheets.
How are the two ranges being changed?
Why haven't you added code tags to your original post like I suggested?
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim f3 As Range, f8 As Range
Set f3 = Range("F3")
Set f8 = Range("F8")
If f3 <> 0 And f8 = 0 Then ActiveSheet.Tab.Color = vbRed
If f3 <> 0 And f8 <> 0 Then ActiveSheet.Tab.Color = vbGreen
End Sub
Bookmarks