Change cell fill colour on mouse click

  • Thread starter Thread starter PHB
  • Start date Start date
P

PHB

Hi

in order to record pupil achievement I would like to change the fill colour
of any cell in a worksheet by clicking in it once with the mouse.

Can anyone tell me how I go about getting Excel to do this please.

Cheers


PAUL
 
Paul, how about when you double click, put in worksheet code

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
With Selection.Interior
'change to color you want
..ColorIndex = 34
.Pattern = xlSolid
End With
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
Back
Top