![]() |
Customer menu Item
Is it possible instead of assigning a macro to a menu item that I can make
it run a code associated directly with the button click instead of in a module? Thanx Todd |
Customer menu Item
Todd,
Buttons on a commandbar do not have a click event. Is that what you are asking? What are you trying to do? Doug Glancy "Todd Huttenstine" wrote in message ... Is it possible instead of assigning a macro to a menu item that I can make it run a code associated directly with the button click instead of in a module? Thanx Todd |
Customer menu Item
I think I know what you are after.
If you want to assign a macro to a menu item that you already have created and linked to a button on a worksheet or form. To activate a macro from another macro its Call MacroName This is what I use for a toolbar button so the code should be something simualr for a custom menu (Original code came from John Green) With MD_Control.Controls(1) 'call the macro you want to execute .OnAction = "MacroName" 'the faceID = button .FaceId = 65 'Tooltip = label you see when the mouse pointer is over the button .TooltipText = "Run the Macro" End With Sub MacroName 'your caode here End Sub "Todd Huttenstine" wrote in message ... Is it possible instead of assigning a macro to a menu item that I can make it run a code associated directly with the button click instead of in a module? Thanx Todd |
Customer menu Item
Yes I want to make a menu item (or button) have its own independant code it
runs) instead of referencing code in another module. I am trying to come up with an alternate solution of replacing all components in a workbook that is already open. "Doug Glancy" wrote in message ... Todd, Buttons on a commandbar do not have a click event. Is that what you are asking? What are you trying to do? Doug Glancy "Todd Huttenstine" wrote in message ... Is it possible instead of assigning a macro to a menu item that I can make it run a code associated directly with the button click instead of in a module? Thanx Todd |
All times are GMT +1. The time now is 07:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com