Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Menu Item by VBA Code
I have an add-in which adds its own menu to the Excel program. I need to be
able to select a shortcut menu item by VBA to update the information displayed on the worksheet. This will automate the update process for the information (otherwise, will need to manually right-click and select the menuitem ~20 times). Thanx in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Menu Item by VBA Code
Hi
Application.CommandBars.FindControl(, 30010).Controls("&Google Search").Execute This example will run a control on the Help menu for example Post back with the name of your control and where it is if you need more help For ID numbers see http://www.rondebruin.com/menuid.htm -- Regards Ron de Bruin http://www.rondebruin.nl "PosseJohn" wrote in message ... I have an add-in which adds its own menu to the Excel program. I need to be able to select a shortcut menu item by VBA to update the information displayed on the worksheet. This will automate the update process for the information (otherwise, will need to manually right-click and select the menuitem ~20 times). Thanx in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Menu Item by VBA Code
John,
I would have thought that the best way was to set an object variable to the men u item when creating it Set myMenuItem = Application.Commandbars("Standard").Controls.Add(T ype:=msoControlButton,temp orary:=true) myMenuItem.Caption = "abc" etc. Declare myMenuItem as a global object variable, and you can refer to that anywhere in the code. -- HTH RP (remove nothere from the email address if mailing direct) "PosseJohn" wrote in message ... I have an add-in which adds its own menu to the Excel program. I need to be able to select a shortcut menu item by VBA to update the information displayed on the worksheet. This will automate the update process for the information (otherwise, will need to manually right-click and select the menuitem ~20 times). Thanx in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting an item from a list | New Users to Excel | |||
Group Boxes - selecting more than one item | Excel Discussion (Misc queries) | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
Selecting an Item from a List and getting a different item to pop. | Excel Worksheet Functions | |||
Adding a menu item right click menu when clicking on a single. | Excel Programming |