LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Built-in Commandbar, can't find the right one

In Excel 2003 I'm trying to add a custom button to several chart related
commandbars. The code I'm using is littered all over the Internet and works
well. For example...

Dim menuCtl As CommandBarButton
Set menuCtl = CommandBars(strName).Controls.Add(msoControlButton , , , , True)
With menuCtl
.Caption = "Do It Mister!"
.OnAction = "DoClickThing"
End With

As long as I provide the correct "strName" string value to grab the correct
commandbar, it works great. The problem is that I can't seem to find the
correct commandbar for chart legends or chart titles. I would think that the
legend, the proper commandbar would be "Format Legend Entry", but I've
noticed that when I iterate on the controls for that commandbar, it lists two
buttons that aren't on the menu displayed, which are "Hide Detail" and "Show
Detail". To be more clear, when I right click on the chart legend, here are
the optionds displayed in the menu that comes up:

Format Legend...
Clear

But if I cycle through the controls on the "Format Legend Entry" I get the
following button captions:

Format Object
Hide Detial
Show Detail
Clear

So once the question is, what's the proper name of the menu I'm looking for?

Thanks,

Ken
 
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
Commandbar [email protected] Excel Programming 4 February 15th 07 03:35 PM
Tag in CommandBar Desert Piranha[_99_] Excel Programming 4 August 10th 06 06:34 AM
cant dim as commandbar Seren Excel Programming 1 December 21st 05 09:18 PM
Find/Replace built-in dialog in XP kevboy Excel Programming 2 December 19th 05 08:59 PM
Commandbar - how to find out which msoCommandButton was pressed JosephVBA Excel Programming 5 February 1st 05 01:32 PM


All times are GMT +1. The time now is 11:30 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"