View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default conditional formatting on click

Right click on the tab and pull down to View Source

Paste this in the source for the sheet that is being modified

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With Target.Interior
If .ColorIndex < 15 Then
.ColorIndex = 15
Else
.ColorIndex = -4142
End If
End With

End Sub

--
HTH,
Barb Reinhardt



"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?