Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Customized Menu Macro with Argument invoked twice

I've created customized Menus which invoke macros, web
links and email.

The menu buttons work properly except for the menu
buttons which contain a macro with an argument. When the
menu button is selected, the macro is invoked twice. If
I remove the argument, the macro is invoked once. I've
tried this with several macros and menu buttons, same
behavior on all of them. This only happens when invoked
from a menu button. How do I include an argument and
prevent the macro from being invoked twice?

Also, I'd like to dynamically create/delete my customized
menus at startup/shutdown. Other forum threads discuss
how to do this, but this technique appears to have many
potential pitfalls. Has anybody successfully implemented
this for all cases? My MS Excel book recommends
distributing an *.xlb file with the menu customizations
and request the user creates a shortcut to this file.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Customized Menu Macro with Argument invoked twice


"Alan" wrote in message
...
I've created customized Menus which invoke macros, web
links and email.

The menu buttons work properly except for the menu
buttons which contain a macro with an argument. When the
menu button is selected, the macro is invoked twice. If
I remove the argument, the macro is invoked once. I've
tried this with several macros and menu buttons, same
behavior on all of them. This only happens when invoked
from a menu button. How do I include an argument and
prevent the macro from being invoked twice?


Hoiw is the button created and the macro assigned? Show some code.


Also, I'd like to dynamically create/delete my customized
menus at startup/shutdown. Other forum threads discuss
how to do this, but this technique appears to have many
potential pitfalls. Has anybody successfully implemented
this for all cases? My MS Excel book recommends
distributing an *.xlb file with the menu customizations
and request the user creates a shortcut to this file.

I know of no such pitfalls, I do it all the time and it works wonderfully. I
have built myself a table driven routine, so all I have to do is put extra
rows in a worksheet, and I have a new button. Works well.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Customized Menu Macro with Argument invoked twice

Firing Twice

do you have parentheses around your arguments?

If so, remove them.

--
John Walkenbach has a table driven method as well which you might want to
look at:

http://j-walk.com/ss/excel/tips/tip53.htm
Creating Custom Menus

--
Regards,
Tom Ogilvy




"Bob Phillips" wrote in message
...

"Alan" wrote in message
...
I've created customized Menus which invoke macros, web
links and email.

The menu buttons work properly except for the menu
buttons which contain a macro with an argument. When the
menu button is selected, the macro is invoked twice. If
I remove the argument, the macro is invoked once. I've
tried this with several macros and menu buttons, same
behavior on all of them. This only happens when invoked
from a menu button. How do I include an argument and
prevent the macro from being invoked twice?


Hoiw is the button created and the macro assigned? Show some code.


Also, I'd like to dynamically create/delete my customized
menus at startup/shutdown. Other forum threads discuss
how to do this, but this technique appears to have many
potential pitfalls. Has anybody successfully implemented
this for all cases? My MS Excel book recommends
distributing an *.xlb file with the menu customizations
and request the user creates a shortcut to this file.

I know of no such pitfalls, I do it all the time and it works wonderfully.

I
have built myself a table driven routine, so all I have to do is put extra
rows in a worksheet, and I have a new button. Works well.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Customized Menu Macro with Argument invoked twice


Thanks for the suggestions. I downloaded Walkenbach's table driven menu
system. This works nicely, there are a few limitations:

- I finally identified how to include web links for some menu items. I
had to add another field to the table for the web link and update the
VBA code to set the menu item appropriate attributes.

- I want one menu item to popup the Outlook Express Send mail window
with the "To" and Subject Field initialized. I have not found a way to
start Outlook Express Send from VBA. There are many examples using
Sendmail and Outlook, but I haven't found one for Outlook Express Send.
The Menu Editor allows you to do this so it is possible.

- Cannot specify an argument for the macro. May need more columns for
the arguments.

I still receive "firing twice" when invoking a menu item macro with an
argument. I've tried removing the () as suggested, I receive an error
and cannot enter it. I've noticed my Menu Editor list of user defined
functions (ie macros) is a small subset of the udf's (ie user defined
functions) listed in the Toolbar Insert Function udf. I think the
problem may be related to the missing udf's in the Menu Editor. Any
suggestions on how to update the Menu Editor udf list to be consistent
with the Toolbar Insert Function udf list? They should be the same.

thanks.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Customized Menu Macro with Argument invoked twice

Outlook express does not expose an object model that can be driven by an
external application. Outlook (a totaly unrelated application with a
similar name) does expose an object model. I am not sure what the Menu
Editor.

John Walkenbach, on his site, has a sendkeys approach to manipulating
Outlook Express

--
Regards,
Tom Ogilvy

"Alan" wrote in message
...

Thanks for the suggestions. I downloaded Walkenbach's table driven menu
system. This works nicely, there are a few limitations:

- I finally identified how to include web links for some menu items. I
had to add another field to the table for the web link and update the
VBA code to set the menu item appropriate attributes.

- I want one menu item to popup the Outlook Express Send mail window
with the "To" and Subject Field initialized. I have not found a way to
start Outlook Express Send from VBA. There are many examples using
Sendmail and Outlook, but I haven't found one for Outlook Express Send.
The Menu Editor allows you to do this so it is possible.

- Cannot specify an argument for the macro. May need more columns for
the arguments.

I still receive "firing twice" when invoking a menu item macro with an
argument. I've tried removing the () as suggested, I receive an error
and cannot enter it. I've noticed my Menu Editor list of user defined
functions (ie macros) is a small subset of the udf's (ie user defined
functions) listed in the Toolbar Insert Function udf. I think the
problem may be related to the missing udf's in the Menu Editor. Any
suggestions on how to update the Menu Editor udf list to be consistent
with the Toolbar Insert Function udf list? They should be the same.

thanks.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
Customized Toolbar Macro Buttons MSThinksItKnowsBetter Setting up and Configuration of Excel 8 June 1st 08 09:28 AM
filter dropdown menu so 2nd drop menu is customized menugal Excel Worksheet Functions 1 September 4th 07 05:25 PM
Customized Macro Button Check [email protected] Excel Discussion (Misc queries) 1 August 11th 07 12:23 AM
Excel 2003 Customized Menu Bar Fernando Gomez Excel Discussion (Misc queries) 2 December 16th 04 10:28 PM
Argument with onAction in a menu. Zeth Larsson Excel Programming 8 December 25th 03 03:21 PM


All times are GMT +1. The time now is 06:11 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"