CommandBars("Insert").Enabled question

  • Thread starter Thread starter Dusan
  • Start date Start date
D

Dusan

Hello,

In my code I want to dissable some menu options so I did:

CommandBars("File").Enabled
CommandBars("Insert").Enabled
....
CommandBars("Window").Enabled

All options I want are disabled but the "Insert" is not.
There is no error messasge at all.
Any idea what is going wrong?

If there is any way to make some options invisible
would be even beter. I tried

CommandBars("Insert").Visible = False

but getting message:
"Method Visible of object CommandBar failed"


Thank you very much
Dusan
 
Dusan,

An example to disable the options in the Tools menu :
Application.CommandBars("Tools").Controls("Options...").Enabled = False

It seems that the "Options..." must be given in the language from your
Excel version ( in my Dutch system i had to fill in "Opties..." ).

You can as well replace the Controls("Options...") with the number (counting
from top to bottom) your "options..." take up in the menu.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 

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

Back
Top