Disabling Built-in items on a menu

P

Project Mangler

The following code disables the File menu on the Worksheet Menubar

CommandBars(1).Controls("File").Enabled = True

Ideally I'd like to be able to disable an individual item on the menu e.g.
"Print", but I've struggled to get there.

Can someone please explain how this is achieved?

Thanks.
 
P

Project Mangler

Got it thanks:

With Application.CommandBars(1).Controls("File")
..Controls("Print...").Enabled = False
End With
 
P

Project Mangler

Ron,

I should have thought of checking your site.

For some reason my code works fine at home (on Win2K/Excel 2003) but not in
my work environment (XP/Excel2003) if run in an activate or startup event.
Oddly it works in XP if I run the procedure directly using F5. Perhaps
switching to the ID will fix it.

Thanks for the reply!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top