Go to the sheet in question, right click, view code, paste what I have below
into the sheet module:

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

Put a value in B2, exit the cell, then go back and right click on the cell.
 Jim

-----Original Message-----
From: Windows Home/SOHO [mailto:[EMAIL PROTECTED] Behalf
Of Slattery, Tim - BLS
Sent: Monday, April 17, 2006 3:18 PM
To: [email protected]
Subject: Re: onClick for cell in Excel


> Tim-
>       I don't know the beginning of this thread, but that
> code is supposed to go into the Sheet Module, by right
> clicking on the sheet tab and choosing view code. It does not
> go into a standard module(module 1 as you called it). Do not
> change the name of the sub.

OK, I put it into a Sheet Module, named it back to
W0rksheet_BeforeLeftClick. Nothing happens.

> And yes, you can call a macro from a
> shape(maybe like something from the drawing toolbar) by right
> clicking on the shape and then assigning your chosen macro to it.

Maybe I'll try that. Can't do any worse.

--
Tim Slattery
[EMAIL PROTECTED]

--
                ----------------------------------------
To Change your email Address for this list, send the following message:
 CHANGE  WIN-HOME  your_old_address  your_new_address
 to:  [EMAIL PROTECTED]
Note carefully that both old and new addresses are required.

--
                ----------------------------------------
To Change your email Address for this list, send the following message:
 CHANGE  WIN-HOME  your_old_address  your_new_address
 to:  [EMAIL PROTECTED]
Note carefully that both old and new addresses are required.

Reply via email to