Celly
Board Regular
- Joined
- Jan 29, 2015
- Messages
- 84
- Office Version
- 2016
- Platform
- Windows
Greetings!
I have a workbook with a chart sheet and custom menus. The custom menus appear under the top level "Add-ins" Excel menu and are created as follows:
This works fine, however when the chart sheet is the active sheet, the Add-ins menu does not contain the MyMenu item. You have to know to switch to a regular sheet for it to re-appear.
This is an annoyance as my menu launches macros which dynamically change the chart. Is there any way around this oddity?
I have a workbook with a chart sheet and custom menus. The custom menus appear under the top level "Add-ins" Excel menu and are created as follows:
VBA Code:
Dim mainMenuBar As CommandBar
Dim helpMenu As Integer
Set mainMenuBar = Application.CommandBars("Worksheet Menu Bar")
helpMenu = mainMenuBar.Controls("Help").Index
Set mainMenu = mainMenuBar.Controls.Add(Type:=msoControlPopup, Before:=helpMenu)
With mainMenu
.Caption = "MyMenu"
.OnAction = "MyMenuMacro"
End With
This works fine, however when the chart sheet is the active sheet, the Add-ins menu does not contain the MyMenu item. You have to know to switch to a regular sheet for it to re-appear.
This is an annoyance as my menu launches macros which dynamically change the chart. Is there any way around this oddity?