ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Menu Items and Disable/Enable in Excel 2003 (https://www.excelbanter.com/excel-programming/290549-menu-items-disable-enable-excel-2003-a.html)

[email protected]

Menu Items and Disable/Enable in Excel 2003
 
I have a question about referencing menu items in VBA using Excel
2003. My workplace intranet has disabled ("grayed out") certain
default menu items on the Worksheet Menu Bar. I want to enable those
menu items. I see various examples that reference menu items (on the
Worksheet Menu Bar) as such:

Application.CommandBars("Worsheet Menu
Bar").Controls("Tools").Controls("Customize").Enab led = False

When I try to type this code in Excel 2003, the second reference to
Controls is not available. In other words, I can reference menus but
not the menu items.

Is this an issue with the version of Excel and a difference in VBA
code? Or, am I off track somewhere?

Thanks,
Tommy )

Ken Macksey

Menu Items and Disable/Enable in Excel 2003
 
Hi

This worked for me in excel 2002.

Application.CommandBars("Worksheet Menu
Bar").Controls("&Tools").Controls("&Customize...") .Enabled = False

HTH

KenM




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

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