Disable Menu Command Bar for Excel, Word in Office 2007

G

Gary Nguyen

Hello all,
I'm looking for a way to disable Menu Command Bar in Excel and Word within
Office 2007.
Something like this doesn't work in Office 2007 anymore.
Application.CommandBars("Worksheet menu
bar").Controls("File").Controls("Exit").Enabled = False
 
J

Jan Hyde (VB MVP)

Gary Nguyen <[email protected]>'s wild
thoughts were released on Mon, 10 Nov 2008 21:48:01 -0800
bearing the following fruit:
Hello all,
I'm looking for a way to disable Menu Command Bar in Excel and Word within
Office 2007.
Something like this doesn't work in Office 2007 anymore.
Application.CommandBars("Worksheet menu
bar").Controls("File").Controls("Exit").Enabled = False

If you are trying to prevent someone from closing the
worksheet then this wouldn't work anyway as there are
several ways to close it.

It might help if you explain why you want to do this?
 
G

Gary Nguyen

Jan, thanks for replying.
However, what I'm asking here is not only for "Exit". I list "Exit" as one
of my example. I'm looking for a way to disable some controls in Office Menu
such as New, SaveAs, Save, etc.
In our application, user could be able to open up their Word, Excel. So,
when Word or Excel open inside the application view, I want some control in
Office Menu to be disabled.
I would appriciate if you could show me how.
Thanks
 

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