ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Built In CommandBars (https://www.excelbanter.com/excel-programming/273280-re-built-commandbars.html)

Sander Lablans

Built In CommandBars
 
On Fri, 1 Aug 2003 06:00:47 -0400, Dave Martin wrote:

I posted this yesterday but don't see it in my Microsoft Outlook Newsreader,
so let me try again. (By the way--if anyone has any suggestions on making
sure the posts appear in the newsreader, I'm all ears. I've been struggling
with this for years).

I would like to add an item to, say the shortcut menu which appears when a
user right clicks the X Axis on a chart embedded in an Excel 2000 worksheet.
I can't find a listing of the names of the built in command bars. Can
someone suggest where I can find a list of built in command bars (the only
one I know is "Worksheet Menu Bar."


Try this code, put it in a module and run in on a new workbook:

Sub CmdBar_ToolBar()

Dim cmdbar, i As Integer, toolbar

Range("A1").Activate
i = 0
For Each cmdbar In Application.CommandBars
ActiveCell.Offset(i, 0).Value = cmdbar.Index
ActiveCell.Offset(i, 1).Value = cmdbar.Name
i = i + 1
Next cmdbar

i = 0
For Each toolbar In Application.Toolbars
ActiveCell.Offset(i, 2).Value = toolbar.Name
i = i + 1
Next toolbar
End Sub

It'll give you all the names of the different command-bars and tool-bars.
It's then up to you to find the correct one...

Good luck!

SL


All times are GMT +1. The time now is 07:32 PM.

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