Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Custom Menus in Chart Sheets

Hi all,

I've an Excel workbook with sheets and charts. On the sheets I was able to
include a custom menu, which works fine. However, if I select a chart, the
custom menu disappears. I am aware of the fact that the reason for this
action is the "Worksheet Menu Bar" flag in my code and I need to include the
"Chart Menu Bar" flag.

I tried for quite some time and I couldn't figure out how I can write my
code that the programm knows if I am on a chart or a ordinary sheet and
display the menu.

Does anybody has an idea, how I could include the "Chart Menu Bar" flag into
my code below?

' Set a CommandBar variable to Worksheet menu bar
Set cbMainMenuBar = _
Application.CommandBars("Worksheet Menu Bar")

Thank you very much for your support.

Kind regards,

Simon Minder
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Custom Menus in Chart Sheets

Hi Simon,

Duplicate the custom menu you've put on "Worksheet Menu Bar" on the "Chart
Menu Bar". In other words your custom menu on both bars.

One way to avoid duplicate code might be something like this

For i = 1 to 2
sBar = iif(i = 1, "Worksheet Menu Bar", "Chart Menu Bar")
Set cmdBar = _
Application.CommandBars(sBar)
' custom menu code
Next

Assumes of course your menu goes in a "place" that exists on both bars.

Regards,
Peter T

"Simon Minder" wrote in message
...
Hi all,

I've an Excel workbook with sheets and charts. On the sheets I was able to
include a custom menu, which works fine. However, if I select a chart, the
custom menu disappears. I am aware of the fact that the reason for this
action is the "Worksheet Menu Bar" flag in my code and I need to include

the
"Chart Menu Bar" flag.

I tried for quite some time and I couldn't figure out how I can write my
code that the programm knows if I am on a chart or a ordinary sheet and
display the menu.

Does anybody has an idea, how I could include the "Chart Menu Bar" flag

into
my code below?

' Set a CommandBar variable to Worksheet menu bar
Set cbMainMenuBar = _
Application.CommandBars("Worksheet Menu Bar")

Thank you very much for your support.

Kind regards,

Simon Minder



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
XL chart sheets Custom size for PPT Brian Reilly, MVP Charts and Charting in Excel 6 January 8th 08 05:51 AM
Custom Menus in Chart Sheets CyberBuzzard Excel Programming 3 September 8th 05 12:09 AM
Custom menus in chart sheets CyberBuzzard Excel Programming 1 September 5th 05 09:26 PM
Custom faces for custom menus/commandbars Stu Valentine Excel Programming 1 September 17th 04 04:28 AM
Custom menus Lee Excel Programming 4 November 12th 03 11:53 PM


All times are GMT +1. The time now is 12:33 PM.

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

About Us

"It's about Microsoft Excel"