Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Add control to the Chart menu of "Chart Menu Bar" commandbar

Thanks Tom - that's excellent.

I suspected it was tied up with referencing the chart menu bar but
couldn't figure out how to reference it and add a control.
Referencing to the CommandBarPopup was the trick!

Thanks again,
Andrew


"Tom Ogilvy" wrote in message ...
Sub AddCltToChartMenu()
Dim cbct As CommandBarControl
Dim cbPop As CommandBarPopup
Set cbPop = Application.CommandBars("Chart Menu Bar").Controls("&Chart")
Set cbct = cbPop.Controls.Add(msoControlButton)
cbct.Caption = "Test"
End Sub

--
Regards,
Tom Ogilvy

Andrew wrote in message
om...
Can anyone help me to get the following to work? It works fine when
adding a button to the menus on the "Worksheet Menu Bar" (eg. replace
"Chart" with "File") but I can't seem to get it to work for the Chart
menu.

Sub AddCltToChartMenu()
Dim cbct As CommandBarControl
Set cbct =

Application.CommandBars("chart").Controls.Add(msoC ontrolButton)
cbct.Caption = "Test"
End Sub

Thanks,
Andrew

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
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F daves Excel Discussion (Misc queries) 3 April 24th 07 04:52 AM
Sheets("Rpt").Copy different results from running in macro than off excel menu?? tmbo Excel Discussion (Misc queries) 7 August 9th 06 01:13 PM
if "a" selected from dropdown menu then show "K" in other cell LEGALMATTERS Excel Worksheet Functions 1 April 13th 06 06:05 PM
"Show Placeholders" in options/view menu does'nt work. Excel Discussion (Misc queries) 0 January 5th 06 12:51 AM
Make "Worksheet Menu Bar" invisible or Delete/hide it's buttons Bob Phillips[_5_] Excel Programming 0 August 11th 03 01:05 PM


All times are GMT +1. The time now is 10:27 AM.

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"