Cancel=True Not Working As Expected

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
608
I do a lot of coding for the event right-click. I end my additional steps with Cancel=True which used to always avoid popping up the incell menu. Now, for the past many months, the cancel=true seems to no longer work and I get an annoying right-click menu that pops up after my code executed. Suggestions?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Do you have the Cancel=True in the right place?
 
Upvote 0
I have cancel=true right before exit sub and yet the right-click menu then immediately pops up. I do call other subroutines before coming back to my BeforeRightClick sub.
 
Upvote 0
I have cancel=true right before exit sub and yet the right-click menu then immediately pops up. I do call other subroutines before coming back to my BeforeRightClick sub.

It might help for you to post your code for us to look at.
 
Upvote 0
If you step through the code with F8, does it ever get to the Cancel line?
 
Upvote 0
If you step through the code with F8, does it ever get to the Cancel line?
Or put a breakpoint on the Cancel line and let the code run normally to see if it ever stops on that line or not.
 
Last edited:
Upvote 0
In that case if the next line is either Exit Sub, or End Sub, I can see no reason why you would still get the menu.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top