ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA macro in Excel toolbars (https://www.excelbanter.com/excel-programming/329932-vba-macro-excel-toolbars.html)

ROland

VBA macro in Excel toolbars
 
I have a custom menuitem, which runs some VBA macros, added to the Excel
'Worksheet Menu Bar' toolbar.
This toolbar changes slightly when I select an embedded graph in the sheet,
and the menuitem disappears.
How can I make this menuitem available in this 'changed' toolbar as well?
thanks
roland, belgium

Greg Wilson

VBA macro in Excel toolbars
 
Roland,

It's a misconception that the buttons disappear on the Worksheet Menu Bar
when you activate a chart. What actually happens is that the Worksheet Menu
Bar is supplated by the Chart Menu Bar (as opposed to Chart toolbar) which
looks identical except that it has a Chart menu item.

To prove this, activate a chart and then drag the menu bar down so that it
is no longer docked but floating. You will see that it's named "Chart Menu
Bar". Conversely, do this when a chart is not active and you will see
"Worksheet Menu Bar". I have never figured out why they don't just have a
hidden Chart menu item on the WMB that is made visible when a chart is
activated and invisible when not.

The suggested solution is to add your button(s) to the Chart Menu Bar as well.

Regards,
Greg

"Roland" wrote:

I have a custom menuitem, which runs some VBA macros, added to the Excel
'Worksheet Menu Bar' toolbar.
This toolbar changes slightly when I select an embedded graph in the sheet,
and the menuitem disappears.
How can I make this menuitem available in this 'changed' toolbar as well?
thanks
roland, belgium



All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com