Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Adding buttons to a new menu bar
I am cross posting ( i think ) because the server seems to have an issue
with the other newsgroup (possibly) Hello everyone I hope someone can help me here. I have a problem at work with my ID resetting and my menu bar (my custom menu bar) has the menus but none of my buttons or the menu lists stay with the ID change... This is something that is too small a problem for our IT people to work out so I did a fix for it. I have a script itself run and add the macros to the menu lists. It works with the following... Dim CmdBar As CommandBar Dim CmdBarMenu As CommandBarControl Dim CmdBarMenuItem As CommandBarControl Set CmdBar = Application.CommandBars("My Custom Menu Bar") Set CmdBarMenu = CmdBar.Controls("Software") Set CmdBarMenuItem = CmdBarMenu.Controls.Add With CmdBarMenuItem .Caption = "5-Digit Zip Code Format" .OnAction = "'" & ThisWorkbook.Name & "'!C200010" .Tag = "SomeString" End With This is repeated for each menu I have manually typed in the bar, "Software" being one of them. So I'm able to add the menu lists to menus I've entered as the one mentioned above, however I don't know how to add Buttons to my menu bar and keep the assigned macro linked to the command (string?). Can anyone assist with this? I need something like the above script but it needs to add the macro to the button. I would imagine its a bit different because you need to identify the button image but man would it help if someone out there could assist. Thank you ahead of time. G |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Adding buttons to a new menu bar
Hi Greegan
See this pages for examples http://support.microsoft.com/default...02&Product=xlw How to customize menus and menu bars in Excel http://www.j-walk.com/ss/excel/tips/tip53.htm Creating Custom Menus (John Walkenbach) TIP http://www.erlandsendata.no/english/...oadcommandbars Ole P. Erlandsen's Web Site (Example workbooks) -- Regards Ron de Bruin http://www.rondebruin.nl "Greegan" wrote in message ... I am cross posting ( i think ) because the server seems to have an issue with the other newsgroup (possibly) Hello everyone I hope someone can help me here. I have a problem at work with my ID resetting and my menu bar (my custom menu bar) has the menus but none of my buttons or the menu lists stay with the ID change... This is something that is too small a problem for our IT people to work out so I did a fix for it. I have a script itself run and add the macros to the menu lists. It works with the following... Dim CmdBar As CommandBar Dim CmdBarMenu As CommandBarControl Dim CmdBarMenuItem As CommandBarControl Set CmdBar = Application.CommandBars("My Custom Menu Bar") Set CmdBarMenu = CmdBar.Controls("Software") Set CmdBarMenuItem = CmdBarMenu.Controls.Add With CmdBarMenuItem .Caption = "5-Digit Zip Code Format" .OnAction = "'" & ThisWorkbook.Name & "'!C200010" .Tag = "SomeString" End With This is repeated for each menu I have manually typed in the bar, "Software" being one of them. So I'm able to add the menu lists to menus I've entered as the one mentioned above, however I don't know how to add Buttons to my menu bar and keep the assigned macro linked to the command (string?). Can anyone assist with this? I need something like the above script but it needs to add the macro to the button. I would imagine its a bit different because you need to identify the button image but man would it help if someone out there could assist. Thank you ahead of time. G |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding Customised Buttons to a toolbar | Excel Discussion (Misc queries) | |||
Adding a menu | Excel Discussion (Misc queries) | |||
Where is the "Chart Menu" for adding a trendline to a set of #s? | Charts and Charting in Excel | |||
When I drag the mouse arrow over menu buttons, no description app. | Excel Discussion (Misc queries) | |||
edit the buttons in right click menu | Excel Worksheet Functions |