Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a question regarding custom Excel 2003 menu item click via MFC automation. The VBA version of the action I want to do is pretty straightforward: Application.CommandBars(1).Controls("NumeriX").Con trols("Object Tools").Controls("Delete All Objects").Execute Now I need to translate the above line to C++ code. I already have the automation classes for CCommandBars, CCommandBar0, CCommandBarControls, CCommandBarControl classes generated by VS.NET 2003 class wizard. The interesting thing is that the get_Item() method of CCommandBarControls class returns a CCommandBarControl object, while in the VBA version another CCommandBarControls object should be returned as the menu contains sub-menus. Also I'm not so clear about the item index usage. From my preliminary testing, the number returned by get_Count() method of CCommandBarControls class is not equal to the number of visable menus on Excel menu bar. Hope someone can clarify my doubt. Thanks! Best regards, Bo ZHU |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot click twice on custom menu in Excel | Excel Programming | |||
Custom Menu item disappeared in Excel 2007 | Excel Programming | |||
Excel 2000 Custom Menu Item | Excel Discussion (Misc queries) | |||
Persistent menu item with Excel Automation Add-in? | Excel Programming | |||
Adding a menu item right click menu when clicking on a single. | Excel Programming |