dblclick event

  • Thread starter Thread starter Marco
  • Start date Start date
M

Marco

Hi,
does anybody know how to catch the dblclick event on any cell in an .xla
(AddIn)? I wrote some workbook functions and want to be notified if any of
my functions is double clicked.

Thanks,
Marco
 
Hi Marco,

You need to use application events.

First, in your addin, add a class module say called clsAppEvenrts.

In the ThisWorkbbok module, add this code


Dim AppClass As New clsAppEvents

Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub

and then in the class module add this code

Public WithEvents App As Application

Private Sub App_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As
Range, Cancel As Boolean)

End Sub

and add the code in there.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Where would your functions be when they are double clicked? In otherwords,
where is the user doubleclicking?
 
The user is doubleclicking any cell that may contain one of the functions I
wrote.
 

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

Back
Top