Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Redditch, Worcestershire, England
    Posts
    233
    Thanks
    0
    Thanked 22 Times in 21 Posts
    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    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?

  3. #3
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Redditch, Worcestershire, England
    Posts
    233
    Thanks
    0
    Thanked 22 Times in 21 Posts
    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='jeremybarker' post='796029' date='02-Oct-2009 16:52']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![/quote]
    Yep, that explains it!

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    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!
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •