ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   command bars in charts (https://www.excelbanter.com/excel-programming/377819-command-bars-charts.html)

[email protected]

command bars in charts
 
Hi,
I would like to modify some of the right click command bar menus in
charts. The following code runs without errors and modifies some of
the command bars (specifically Series and Plot Area and Inactive
Chart) but not the others. Do I have to unprotect something to modify
the others?

Thanks,
Bob




For i = 1 To 10
If i = 1 Then commandBarName = "Series"
If i = 2 Then commandBarName = "Plot Area"
If i = 3 Then commandBarName = "Floor and Walls"
If i = 4 Then commandBarName = "Trendline"
If i = 5 Then commandBarName = "Chart"
If i = 6 Then commandBarName = "Format Data Series"
If i = 7 Then commandBarName = "Format Axis"
If i = 8 Then commandBarName = "Format Legend Entry"
If i = 9 Then commandBarName = "Format Legend Entry"
If i = 10 Then commandBarName = "Inactive Chart"



Set cb = CommandBars(commandBarName)
Set cbc = cb.Controls.Add
With cbc
.Caption = commandBarName & " Menu "
.TooltipText = "very cool"

End With

Next



All times are GMT +1. The time now is 01:58 AM.

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