View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Launching a Macro bt Double Clicking

Try:
Private Sub Woorksheet_BeforeDoubleClick_(ByVal Target As Range, Cancel As
Boolean)
If Target.Address = "$E$5" Then
Cancel = True
Call Find2
End If
End Sub





"jswalsh33" wrote:

I would like to launch an Excel macro by double clicking on a cell in an
Excel worksheet. I used one of your answers to a similar question and wrote
the following code in the "View Code" area of the worksheet.

Private Sub Woorksheet_BeforeDoubleClick_(ByVal Target As Range, Cancel As
Boolean)
If Target.Address = "$E$5" Then
Call Find2
End If
End Sub

If I then click on Cell E5 on the worksheet nothing happens.

What am I doing wrong?

I am running Windows XP, Excel OFFXL7