Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use it like a toggle
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column < 12 Then Exit Sub If Target.Interior.ColorIndex = 3 Then Target.Interior.ColorIndex = xlColorIndexNone Else Target.Interior.ColorIndex = 3 End If End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Don Guillett" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to run an event upon changing the value of a specific cell? | Excel Worksheet Functions | |||
Is there a double click event for cell? | Excel Discussion (Misc queries) | |||
changing cell colour on click | Excel Discussion (Misc queries) | |||
Click event on cell triggers a macro | Excel Programming |