Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to execute macro when selecting user-defined menu in ribbon
Hi!
I would like to know how to automatically execute a macro when I select a user-defined tab I created in my Excel ribbon. I tried onAction tag in my ribbon code for my menu: <menu id="DropdownBD7020" label="BM7020" size="large" imageMso="ControlsGallery" onAction="MacroName" but that doesn't work. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to execute macro when selecting user-defined menu in ribbon
Matthieu,
I take it you are creating a dropdown in the ribbon in XML. Can you post the whole XML and the callback code that you have? -- HTH Bob "Mathieu936" wrote in message ... Hi! I would like to know how to automatically execute a macro when I select a user-defined tab I created in my Excel ribbon. I tried onAction tag in my ribbon code for my menu: <menu id="DropdownBD7020" label="BM7020" size="large" imageMso="ControlsGallery" onAction="MacroName" but that doesn't work. Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to execute macro when selecting user-defined menu in ribbon
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui" <ribbon <tabs <!-- Add-Ins Ribbon Menu -- <tab id="SpecialFunctionsTab" label="My Special Functions" <!-- Structural Analysis Library Tools Group -- <group id="GroupBD7020" label="BM7020" <!-- BD7020 Dropdown -- <menu id="DropdownBD7020" label="BM7020 Manual" size="large" imageMso="ControlsGallery" <menu id="Menu01GeneralInformation" label="01 General Information" <menu id="Menu02StressReportFormat" label="02 Stress Report Format" <button id="ReportPWC" label="Stress Report" onAction="InsertTool" / </menu </menu </menu </group </tab </tabs </ribbon </customUI |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to execute macro when selecting user-defined menu in ribbon
On 9 juin, 10:10, Mathieu936 wrote:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/ customui" *<ribbon * * <tabs * * * <!-- Add-Ins Ribbon Menu -- * * * <tab id="SpecialFunctionsTab" label="My Special Functions" * * * * *<!-- Structural Analysis Library Tools Group -- * * * * *<group id="GroupBD7020" label="BM7020" * * * * * <!-- BD7020 Dropdown -- * * * * * <menu id="DropdownBD7020" label="BM7020 Manual" size="large" imageMso="ControlsGallery" * * * * * * <menu id="Menu01GeneralInformation" label="01 General Information" * * * * * * * *<menu id="Menu02StressReportFormat" label="02 Stress Report Format" * * * * * * * * * * *<button id="ReportPWC" label="Stress Report" onAction="InsertTool" / * * * * * * * * * *</menu * * * * * * * * </menu * * * * * * </menu * * * * *</group * * * </tab * * </tabs * </ribbon </customUI any idea? I would like to change the line <tab id="SpecialFunctionsTab" label="My Special Functions" for <tab id="SpecialFunctionsTab" label="My Special Functions" onAction="MyMacro" However it does'nt work. I tried onAction, onClick, onSelect, onActivate but nothing works :-( |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to execute macro when selecting user-defined menu in ribbon
If you use a dynamicMenu tag instead of a menu tag, you name a callback
that runs VBA to generate the menu. Within this VBA you could call the other code you want to run. I don't know the details off the top of my head, but i made it work recently based on what's in the book RibbonX by Hennig, Martin, and Puls. - Jon ------- Jon Peltier Peltier Technical Services, Inc. 774-275-0064 http://peltiertech.com/ On 6/9/2010 9:46 AM, Mathieu936 wrote: Hi! I would like to know how to automatically execute a macro when I select a user-defined tab I created in my Excel ribbon. I tried onAction tag in my ribbon code for my menu: <menu id="DropdownBD7020" label="BM7020" size="large" imageMso="ControlsGallery" onAction="MacroName" but that doesn't work. Thanks! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to execute macro when selecting user-defined menu in ribbon
On 10 juin, 22:39, Jon Peltier wrote:
If you use a dynamicMenu tag instead of a menu tag, you name a callback that runs VBA to generate the menu. Within this VBA you could call the other code you want to run. I don't know the details off the top of my head, but i made it work recently based on what's in the book RibbonX by Hennig, Martin, and Puls. - Jon ------- Jon Peltier Peltier Technical Services, Inc. 774-275-0064http://peltiertech.com/ On 6/9/2010 9:46 AM, Mathieu936 wrote: Hi! I would like to know how to automatically execute a macro when I select a user-defined tab I created in my Excel ribbon. I tried onAction tag in my ribbon code for my menu: <menu id="DropdownBD7020" label="BM7020" size="large" imageMso="ControlsGallery" onAction="MacroName" but that doesn't work. Thanks!- Masquer le texte des messages précédents - - Afficher le texte des messages précédents - Okay thanks, I'll check what I can do.. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to execute macro when selecting user-defined menu in ribbon
I tried to create a workbook with your XML, but it didn't generate the
ribbon for some reason. -- HTH Bob "Mathieu936" wrote in message ... On 9 juin, 10:10, Mathieu936 wrote: <customUI xmlns="http://schemas.microsoft.com/office/2006/01/ customui" <ribbon <tabs <!-- Add-Ins Ribbon Menu -- <tab id="SpecialFunctionsTab" label="My Special Functions" <!-- Structural Analysis Library Tools Group -- <group id="GroupBD7020" label="BM7020" <!-- BD7020 Dropdown -- <menu id="DropdownBD7020" label="BM7020 Manual" size="large" imageMso="ControlsGallery" <menu id="Menu01GeneralInformation" label="01 General Information" <menu id="Menu02StressReportFormat" label="02 Stress Report Format" <button id="ReportPWC" label="Stress Report" onAction="InsertTool" / </menu </menu </menu </group </tab </tabs </ribbon </customUI any idea? I would like to change the line <tab id="SpecialFunctionsTab" label="My Special Functions" for <tab id="SpecialFunctionsTab" label="My Special Functions" onAction="MyMacro" However it does'nt work. I tried onAction, onClick, onSelect, onActivate but nothing works :-( |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Execute macro when active cell is in a defined area | Excel Programming | |||
Can you do user defined Menu Macros in Excel like in Lotus? | Excel Programming | |||
Selecting a Whole User Defined Row Using VBA | Excel Programming | |||
User Defined formula, selecting range | Excel Programming | |||
User defined menu | Excel Programming |