Hi Tim.
There are a few of us Excellers here, snooping around :)

Just the one cell?
Lets say its B2


Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Cancel = False 'to turn on right click menu
If Not Intersect(Target, [B2]) Is Nothing Then
  Cancel = True  'to turn off right click menu
  [B2].Value = [B2].Value + 1
End If
End Sub


Just right click the sheet tab, pick view code and paste the above code there.
To increment B2 by 1 right click the cell.
If this is not what you want, just ask as there are many other ways of doing 
this.


Regards
Robert McCurdy

----- Original Message ----- 
From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, April 15, 2006 6:42 AM
Subject: APPS: onClick for cell in Excel


I suppose I should be asking this on the Excel list, but I'm not
subscribed there. Is there a way to associate a macro with a click on a
cell in Excel, like an onClick attribute in HTML?

I'm trying to get a cell to increment when I click on it, and I can't
see how to do it.


--
Tim Slattery
[EMAIL PROTECTED]


--
                ----------------------------------------
WIN-HOME Archives:  http://PEACH.EASE.LSOFT.COM/archives/WIN-HOME.html
Contact the List Owner about anything:  [EMAIL PROTECTED]
Official Win-Home List Members Profiles Page
 http://www.besteffort.com/winhome/Profiles.html

--
                ----------------------------------------
WIN-HOME Archives:  http://PEACH.EASE.LSOFT.COM/archives/WIN-HOME.html
Contact the List Owner about anything:  [EMAIL PROTECTED]
Official Win-Home List Members Profiles Page
 http://www.besteffort.com/winhome/Profiles.html

Reply via email to