Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
windows menu item | Excel Discussion (Misc queries) | |||
Menu item disabled | Excel Worksheet Functions | |||
keep new menu item with workbook | Excel Discussion (Misc queries) | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
Access menu item from VBS | Excel Programming |