View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default click event for changing cell color

right click sheet tabview codeinsert this. Any cell in column 12 will be
colored red when clicked.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column < 12 Then Exit Sub
Target.Interior.ColorIndex = 3
End Sub

--
Don Guillett
SalesAid Software

"liglin" wrote in message
m...
Hello,

I would like to write a macro that changes the color of a cell to red
when it is clicked - could anyone help me with the click or
onmousedown event?

Thanks,
Liglin