View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
A.W.J. Ales A.W.J. Ales is offline
external usenet poster
 
Posts: 63
Default CommandBars("Insert").Enabled question

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 *

"Dusan" wrote in message
...
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