Change cell fill colour on mouse click

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
 
P

Paul B

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 **
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top