CommandBars("Insert").Enabled question
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 |
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 |
All times are GMT +1. The time now is 08:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com