ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disable Edit/Cut menu option (and other specific ones) (https://www.excelbanter.com/excel-programming/433910-re-disable-edit-cut-menu-option-other-specific-ones.html)

CM

disable Edit/Cut menu option (and other specific ones)
 
found answer in another post:

Application.CommandBars(1).Controls("Edit").Contro ls("Cut").Enabled = False

"cm" wrote:

I want to disable specific menu options upon workwheet open. (I have not done
this before). One need is to disable Edit/Cut, Edit/Copy, but NOT Edit/Paste.

Other posts say to use the following example:

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=522, Recursive:=True).Enabled = False

1. How do I find the correct 'ID' for each menu item I want to disable?
2. Does this section of code belong in the 'This Workbook' module?

thanks,
cm




All times are GMT +1. The time now is 02:23 AM.

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