View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default change tab color base on cell value

Hi G

Locate the ThisWorkbook module in the VB editor (Alt F11 or similar) and
paste this in:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address = "$N$13" Then
If IsDate(Target.Value) Then Sh.Tab.ColorIndex = 3
End If
End Sub

Assuming that the date is typed or pasted, and that removing red is not
needed when the date is deleted.

HTH. Best wishes Harald

"G. Wolfe" <G. skrev i melding
...
I would like to change the worksheet tab color to red if a date exist in

cell
N13. I would like to set this up for the entire workbook, because new
worksheet can be added at any time.

Please keep in mind that I'm not a VB programmer.

Thanks for any input.
G. Wolfe