Programmatically call a menu item from a menu from a Add-in

T

Thomas

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("Member 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!
 
J

Jim Cone

Try this version (assumes the Hyperion control is on the Excel menu bar)...
Application.CommandBars(1).Controls("Hyperion").Controls("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" <[email protected]>
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("Member 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!
 
T

Thomas

Wow, that works. It seems that for non-Excel standard, I should use this
syntax.

Thanks a lot for the quick help!

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top