Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to disable Commands on a Menu

Status
Not open for further replies.

PercyN

Programmer
May 16, 2007
86
Hi, I found an article on how to disable menu items whic has been helpful but what I want to do is disable or enable particular commands specfic drop down menus on my custom menu and not the the entire menu.
 
So how come I'm not getting any replies on this thread. Lol. Come on guys... I really need this
 
How are ya PercyN . . .

Try the following in a button for testing.
Code:
[blue]   Dim CBar As Object
   
   Set CBar = CommandBars("[purple][B][I]COmmandbarName[/I][/B][/purple]")
   
   CBar.Controls("[purple][B][I]MenuName1[/I][/B][/purple]").Enabled = False
   CBar.Controls("[purple][B][I]MenuName2[/I][/B][/purple]").Enabled = False
   [green]'
   '[/green]
   CBar.Controls("[purple][B][I]MenuNameX[/I][/B][/purple]").Enabled = False
   
   Set CBar = Nothing[/blue]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top