Chart Menu Bar Won't Change To Data Menu Bar

  • Hey guys, this one has me stumped.. my worksheet menu bar is displaying the 'Chart' menu no matter what I do. Not only do I have no charts in the workbook, (verified this by: )

    For Each ws In Worksheets
    MsgBox ActiveSheet.ChartObjects.Count
    Next ws

    but adding worksheets, selecting various parts of a worksheet, creating a chart and deleting it, and everything else I've tried has no effect.

    One interesting thing - the first chart I added (to test if it would 'unstick' itself upon deletion of the new chart) was named 'Chart 2', implying there was a chart1 that existed previously.... although I am fairly certain I never added a chart to this workbook at any point.

    Also, the menu bar is working fine in other workbooks, and changes to chart and back to data like normal.

    Anyone have any ideas?

  • Re: Chart Menu Bar Wont Change To Data Menu Bar

    Unfortunetly, its ~ 5 megs and although I could split it up and upload parts of it, I have no clue where the hidden chart or problem is

  • Re: Chart Menu Bar Wont Change To Data Menu Bar

    Ok, if I start the file without macros enabled it runs correctly, if I start the file WITH macros it starts correctly but then something in is causing the chart menu to appear, specifically something here:

    I run the sub 'turn off' above, which runs both of the above subs, and then when I run turn_on, everything reappears, but with the chart menu in place of the data menu. It still does it with the 9 controls commented out (like below)

  • Re: Chart Menu Bar Wont Change To Data Menu Bar

    bump... any ideas?

    If I use the 3 macros above in a new workbook, they work correctly and return the data menu as normal... im really stuck on this one...

  • Re: Chart Menu Bar Wont Change To Data Menu Bar

    Found it.

    For anyone with the same problem - apparently the worksheet menu bar w/ chart menu bar has its own ID separate from the worksheet menu bar w/ data menu? My array that I used to save all open commandbars was apparently changing 'data' to 'chart' at the end of the macro. Application.CommandBars("Worksheet Menu Bar").Enabled = True fixed it.

  • Re: Chart Menu Bar Wont Change To Data Menu Bar

    follow up - The array I was using, I was starting with '2' as the first menu bar to enable, which is actually the worksheet menu bar WITH the chart replacing the data menu. Use the array from 3 to 117 in all subs to avoid turning on chart when you dont want it.

    btw, sorry to bump this but my first 'solved' post was pretty unclear about the problem, I ran into it again in another instance and looked this thread up

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!