Excel doesn't trap for a single click, if you are looking to just change
colors of certain cells, you can use the worksheet's before double-click
event handler to do this.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
'change fill color of cell C3 if it is double-clicked
If Application.Intersect(Target, Range("C3")) Is Nothing Then
Exit Sub ' was not cell C3
End If
If Target.Interior.ColorIndex = 3 Then ' 3 is red
Target.Interior.ColorIndex = 5 ' make it blue
Else
Target.Interior.ColorIndex = 3 ' set to red
End If
Cancel = True ' cancel the double-click
End Sub
When you double-click on the cell (C3 in this case) the color will toggle
between red and blue. If you'd like to toggle between 'no fill' (white) and
another color, change the = 5 above to = xlNone
If you are looking for something that would work on any cell, take a look at
Chip Pearson's RowLiner add-in:
http://www.cpearson.com/excel/RowLiner.htm