Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Programmatically call a menu item from a menu from a Add-in

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Programmatically call a menu item from a menu from a Add-in

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

Thanks a lot for the quick help!

Thomas

"Jim Cone" wrote:

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!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA:programmatically invoking menu items from Excel Worksheet menu morse100 Excel Programming 15 October 29th 10 07:29 PM
Call a menu item dkaydkay Excel Programming 4 February 14th 07 04:10 PM
Adding Sub Menu Item to Current Custom Menu Renato Excel Programming 2 December 19th 05 12:48 AM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"