ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Before right click in a sheet (https://www.excelbanter.com/excel-programming/285965-before-right-click-sheet.html)

raj

Before right click in a sheet
 
Please help if you can think of a solution for this.

I have code in a sheet module that calls a function to
open a custom menu "before right click".

The program works as intended, but when the user right
clicks if nothing is selected and the user just clicks in
the sheet again (cancels the menu), the standard shortcut
menu will sometimes appear and stay "lit" and other times
it flashes on and off.

Is there a way to keep the built-in menu from appearing in
this case? Note that in other sheets, I want the built-in
menu to be fully functional. Some code to dismiss the menu
would be best.

Your example code would be most beneficial. Thanks in
advance.

Tom Ogilvy

Before right click in a sheet
 
In the beforeRight click there is a cancel argument. Set it to True in
your code.

cancel = True

--
Regards,
Tom Ogilvy

raj wrote in message
...
Please help if you can think of a solution for this.

I have code in a sheet module that calls a function to
open a custom menu "before right click".

The program works as intended, but when the user right
clicks if nothing is selected and the user just clicks in
the sheet again (cancels the menu), the standard shortcut
menu will sometimes appear and stay "lit" and other times
it flashes on and off.

Is there a way to keep the built-in menu from appearing in
this case? Note that in other sheets, I want the built-in
menu to be fully functional. Some code to dismiss the menu
would be best.

Your example code would be most beneficial. Thanks in
advance.




raj

Before right click in a sheet
 
You have done it again, Tom my old friend. Thank you.

-----Original Message-----
In the beforeRight click there is a cancel argument.

Set it to True in
your code.

cancel = True

--
Regards,
Tom Ogilvy

raj wrote in message
...
Please help if you can think of a solution for this.

I have code in a sheet module that calls a function to
open a custom menu "before right click".

The program works as intended, but when the user right
clicks if nothing is selected and the user just clicks

in
the sheet again (cancels the menu), the standard

shortcut
menu will sometimes appear and stay "lit" and other

times
it flashes on and off.

Is there a way to keep the built-in menu from appearing

in
this case? Note that in other sheets, I want the built-

in
menu to be fully functional. Some code to dismiss the

menu
would be best.

Your example code would be most beneficial. Thanks in
advance.



.



All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com