Built in Commandbars

  • Thread starter Thread starter Dave Martin
  • Start date Start date
D

Dave Martin

I'm looking for a way to add some custom controls to some built-in
commandbars in Excel 2000. This is easy for the Worksheet menubar, but I
can't find the names or index of such built in commandbars as the shortcut
menu that pops up when the user right clicks, say, the y axis on an embedded
chart. Can someone suggest where I can find a list of Excel's Built in
commandbars and how I can intercept the right click event on the axis and
add my own controls to the resulting shortcut menu?

Thanks.
 
Dave -

I found a piece of code to list command bars at

http://www.excel-center.com/mailing/031198h.htm

and I added a column for Type:

'Place the code below into the standard module
Sub FullMenu()
Dim Cbar As CommandBar
Dim i%
Cells(1, 1) = "Name"
Cells(1, 2) = "Local Name"
Cells(1, 3) = "Visible"
Cells(1, 4) = "Type"
i = 2
For Each Cbar In CommandBars
i = i + 1
Cells(i, 1) = Cbar.Name
Cells(i, 2) = Cbar.NameLocal
Cells(i, 3) = Cbar.Visible
Select Case Cbar.Type
Case 0
Cells(i, 4) = "Menu Bar"
Case 1
Cells(i, 4) = "Normal"
Case 2
Cells(i, 4) = "Pop Up"
End Select
Next
Columns("A:D").AutoFit
End Sub

- Jon
 
Back
Top