I tried the tab color macro in an xlsb and it worked (sheet change event).
The only way I can see to have the one macro work on multiple sheets easily is to put in the the "ThisWorkbook" module as a sheet change event. In order to have it work on some sheets but not all, it would be be easiest if the sheets you want it to apply to have something in common in the name that could be tested with an IF..THEN statement. Alternatively, you could list the sheets you want to bypass and exit the code. For example:
Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name = "sheet1" Then
If Target.Address(0, 0) = "B1" Or Target.Address(0, 0) = "J1" Then
Dim B1 As Range, _
J1 As Range
Set B1 = Sh.Range("B1")
Set J1 = Sh.Range("J1")
If IsDate(B1.Value) And J1.Value = "" Then
Sh.Tab.Color = vbRed
ElseIf IsDate(J1) Then
Sh.Tab.Color = vbGreen
End If 'is date
End If 'target
End If 'sh
End Sub
Bookmarks