Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BeforeDoubleClick Event not working

Status
Not open for further replies.

AMCCoder

Programmer
Aug 19, 2005
15
0
0
US
I am trying to use the beforedoubleclick event in a worksheet, but I cannot get the event to trigger. Any assistance would be greatly appreciated.

I am using a simple function just to see if the event is triggering. This function is in the code for the worksheet I am trying to use. SheetBeforeDoubleClick and BeforeRightClick events also do not trigger. I have tried protecting my worksheet to see if that helped, but to no avail.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)

MsgBox "Test", vbCritical, "Test"
Cancel = True
End Sub

Again, any assistance is appreciated.
 
Well, I just found the answer to my question.

Apparently, the "EnableEvents" property was set to false. Does anyone know if this property's value remains set even after Excel closes? Does Excel (Office, etc.) not defaul this value to true on opening a workbook or starting the application.

Thanks for any info.

 
The EnableEvents property defaults to True and is reset to this default value when Excel is opened. This is an application-wide property so if one workbook sets it to false a second workbook, upon opening, will not respond to events until EnableEvents is set to True again.


Regards,
Mike
 
Thanks a bunch. Now I just have to search code on several workbooks to find out when I forgot to set EnableEvent to True...

Thanks,
Joseph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top