conditional formatting on click
Try this worksheet event macro. It is coded for cell B9, but you can adjust
to suit your needs:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set t = Target
Set r = Range("B9")
If Intersect(t, r) Is Nothing Then Exit Sub
If r.Interior.ColorIndex = 15 Then
r.Interior.ColorIndex = xlNone
Else
r.Interior.ColorIndex = 15
End If
End Sub
--
Gary''s Student - gsnu200771
"beverlydawn" wrote:
I want a cell to turn grey when clicked on, also to be clear if clicked on
after it has been grey. Is that possible?
|