Menu Items and Disable/Enable in Excel 2003

  • Thread starter Thread starter tholt2
  • Start date Start date
T

tholt2

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").Enabled = 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 ([email protected])
 
Hi

This worked for me in excel 2002.

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

HTH

KenM
 
Back
Top