Highlight Cell

In a Dirty Cell Update situation this will come after

Sub HighlightCell(rngCell As Range)

    'delete any Conditional Formats
    rngCell.FormatConditions.Delete

    With rngCell.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 192
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    With rngCell.Font
        .ThemeColor = xlThemeColorDark1
        .TintAndShade = 0
    End With
    
    Call DirtyCellsButtonON
        
End Sub

Improvements:

  • The above code needs reducing and removing xlThemeColorDark1 from Font.ThemeColor
  • Add different kinds of ‘Highlight’ formatting. eg. Borders (would be messy!), CellComment.
  • Add reverting to Conditional Formatting. Note that this is removed at the beginning. Conditional Formats take precedence over Cell Fill format. However, I can’t think of a scenario where you would want to retain Conditional Formats after a Highlight event.
  • Call DirtyCellsButtonON … should be DirtyCellsButton(“On”)

DirtyCellsButtonON (link to)