ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removing the right click capability (https://www.excelbanter.com/excel-programming/286545-removing-right-click-capability.html)

Richard m

Removing the right click capability
 
I have created code to create special menus and they work fine. But ho
do I keep the right click menu from appearing when you right click th
main menu?

Can this be done and how

--
Message posted from http://www.ExcelForum.com


Rob van Gelder[_4_]

Removing the right click capability
 
If you are catching the BeforeRightClick event you can set the Cancel
argument to True (Cancel = True) which will tell Excel not to continue
processing the RightClick event.


"Richard m" wrote in message
...
I have created code to create special menus and they work fine. But how
do I keep the right click menu from appearing when you right click the
main menu?

Can this be done and how?


---
Message posted from http://www.ExcelForum.com/




Richard m

Removing the right click capability
 
Rob,

I put this in the worksheet code and it kept the right click memu from
showing. But my problem is to the cancel the right click menu when I
right click the main menu bar or any of the other tool bars.


---
Message posted from http://www.ExcelForum.com/


Tom Ogilvy

Removing the right click capability
 
Commandbars("Toolbar List").Enabled = False

Works in Excel 97 SR1 and later

--
Regards,
Tom Ogilvy


Richard m wrote in message
...
Rob,

I put this in the worksheet code and it kept the right click memu from
showing. But my problem is to the cancel the right click menu when I
right click the main menu bar or any of the other tool bars.


---
Message posted from http://www.ExcelForum.com/




Richard m

Removing the right click capability
 
Thanks Tom,

This helps me start a great New Year. Just one thing for others,
remember to set it true in the deactivate sub or you will not get your
right click back.


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 03:20 PM.

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