View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Programmatically call a menu item from a menu from a Add-in

Try this version (assumes the Hyperion control is on the Excel menu bar)...
Application.CommandBars(1).Controls("Hyperion").Co ntrols("Member Select...").Execute

If the above doesn't work then it probably means that the Member Select item contains
additional controls and you will have to choose one...

Application.CommandBars(1).Controls("Hyperion") _
..Controls("Member Select...").Controls("Sludge").Execute
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Thomas"
wrote in message
I have the Hyperion Smart View add-in in my Excel. I tried to add a command
button which basically will call a command item on this Hyperion menu.

When I used the
Application.CommandBars("Hyperion").Controls("Memb er Select...").Execute

in the VBA code, it does not work. The error message is "Runtime error 5:
invalid procedure call or argument".
If I call an Excel standard menu item, it works fine.
Does anyone know how to programmatically call a non-Excel standard menu item
that comes from a third-party add-in?
Thanks a lot in advance!