ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Textbox (Object) Right Click Menu - Disable Cut (https://www.excelbanter.com/excel-programming/442124-textbox-object-right-click-menu-disable-cut.html)

Troubled User

Textbox (Object) Right Click Menu - Disable Cut
 
I am looking to disable the right click Cut event when dealing with Text
boxes (Drawing Objects). I have seen code that disables the right click cut.
The following code works on the page, but not when a textbox is selected:

Dim TheCmdBar as Office.CommandBarControl

for each TheCmdBar in Applicaiton.CommandBars.FindControls(ID:=21)
TheCmdBar.Enabled = False
Next TheCmdBar

Thanks in advance.





All times are GMT +1. The time now is 12:07 PM.

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