Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F daves Excel Discussion (Misc queries) 3 April 24th 07 04:52 AM
"Disk is Full" add-on question to "Can't reset last cell" post tod [email protected] Excel Discussion (Misc queries) 0 January 22nd 07 02:32 AM
"Toggle total row" button not enabled in Excel 2003 dominic_howden Excel Discussion (Misc queries) 0 April 12th 06 09:21 AM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 03:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"