How do I highlight the active cell in a spreadsheet?
Hi, CW,
Try pasting this into the code window of the worksheet for which you want to
highlight the active cell.
Change the "22" value in the sixth line to change the colour of the highlight.
Hope this helps
Pete
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete
With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 22
End With
End Sub
"CW" wrote:
I want the active cell to change color.
|