Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have asked this question somewhat less detailed than before but did not
successfully get a working answer. The problem is basic. I've created a menu on the menu bar (My Menu) that is specific to the application I am creating. Thus: .... code above this and variable declarations. Loop through to setup the menu on both the worksheet and chart sheets. For MenuLoopCounter = 1 To 2 '---------------------------------------------------------------------------------------------------------------- ' Add the MyMenu to the Menu Bar Set MyMenu = CommandBars(MenuLoopCounter).Controls.Add _ (Type:=msoControlPopup, Temporary:=True) '--------------------------------------------------------------- ' Add the MyMenu title (a caption) to the Menu Bar MyMenu.Caption = "MyMenu" '------------------------------------------------------------------------- ' Add MyMenu List Item for the Estimate Worksheet Set MyMenuItem = MyMenu.Controls.Add(Type:=msoControlButton) With MyMenuItem .Caption = "Estimate" .OnAction = "Macro1" End With .... more code here. ' .................................................. ... ' Add MyMenu List Item ' .................................................. ... Set MyMenuItem = MyMenu.Controls.Add(Type:=msoControlButton) With MyMenuItem .Caption = "Submenu 1" .OnAction = "Submenu1macro" .Tag = "Sub1" .Enabled = False End With .... even more code. Now, I want to enable the Submenu 1 just when Sheet 4 is active and not any other time. Or better yet, just show this submenu item when Sheet 4 is active. Any help would be most appreciated. I am sure it is my not fully qualifying the object. Sincerely, Bryan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel List submenu missing in XP, after reloading builtin menus | Excel Worksheet Functions | |||
Userforms: Disabling - Enabling the X | Excel Programming | |||
Disabling and re-enabling the AutoFilter from VBA | Excel Programming | |||
Disabling/enabling events with a button created by code?? | Excel Programming | |||
Enabling/Disabling Macros | Excel Programming |