• Cancel argument in Before_DoubleClick event

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Cancel argument in Before_DoubleClick event

    Author
    Topic
    #462898

    Hi, I’m trying to replace the default action of a double_click (or a right click) on a particular cell with my own action.

    I can get my action to happen for the correct cell by testing the Target argument with Worksheet_BeforeDoubleClick or Worksheet_BeforeRightClick, but even though I specify Cancel = True the default action happens immediately afterwards – i.e. the cell goes into Edit mode when there’s a double click, or shows Excel’s default right-click menu when there’s a right-click.

    Is this a known bug with Excel 2000 or am I missing something?

    Jeremy

    Viewing 2 reply threads
    Author
    Replies
    • #1179678

      I’m not aware of such a bug. Could you post your code, or a copy of the workbook with sensitive info removed or altered?

    • #1179681

      Found the culprit! Took the age-old step of exiting and restarting Excel. Normally (on autopilot) I then load our SAP-BW add-in, but this time I didn’t and my code now works OK.

      Obviously the add-in (which provides its own handler for double-clicks and right-clicks within BW query ranges) prevents me doing what I’m trying to do!

      Jeremy

      • #1179686

        Obviously the add-in (which provides its own handler for double-clicks and right-clicks within BW query ranges) prevents me doing what I’m trying to do!

        Yep, that explains it!

    • #1179721

      I had something similar in another forum a while ago. Turned out a third-party add-in was explicitly setting Cancel to False, for no good reason that I can think of!

    Viewing 2 reply threads
    Reply To: Cancel argument in Before_DoubleClick event

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: