Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running macros from UIeditor ribbon - Strange Step Into behavior
I have made a ribbon addition with UIEditor for Excel 2007:
------------------- <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" <ribbon <tabs <tab id="customTab" label="IK-Lehti" <group id="customGroup" label="IK-Lehti" <button id="customButton1" label="Lisää" size="large" onAction="AddSaaja" imageMso="OutlineExpand" / <button id="customButton2" label="Keskeytä" size="large" onAction="Paattyy" imageMso="MailMergeGotToLastRecord" / <button id="customButton3" label="Poista" size="large" onAction="Poista" imageMso="TableDeleteRows" / <button id="customButton4" label="Tarrat" size="large" onAction="Tarrat" imageMso="EnvelopesAndLabels" / <button id="customButton5" label="Laskut" size="large" onAction="Laskut" imageMso="DollarSign" / <button id="customButton6" label="Apu" size="large" onAction="Apu" imageMso="Help" / </group </tab </tabs </ribbon </customUI ------------------------- The first two macros and the last run without problem. Macros 3,4 and 5 give an error message like: "Cannot run macro POISTA. Maybe macro is not available in this workbook or macros are disabled". The first three macros are in the same module and given names as "Sub POISTA(Optional control As IRibbonControl)". It appears to me that something is wrong with the modules, because I am not able to debug some of the macros with step into (f8). Thankful for any help Håkan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running macros from UIeditor ribbon - Strange Step Into behavior
On Saturday, January 25, 2020 at 9:27:22 PM UTC+2, Péhemme wrote:
Strange indeed ! The generation of callback do reconize the only 2 first macros. If you name your macros starting par rx_ the generation of callbacks give : 'Callback for customButton1 onAction Sub rx_AddSaaja(control As IRibbonControl) End Sub 'Callback for customButton2 onAction Sub rx_Paattyy(control As IRibbonControl) End Sub 'Callback for customButton3 onAction Sub rx_Poista(control As IRibbonControl) End Sub 'Callback for customButton4 onAction Sub rx_Tarrat(control As IRibbonControl) End Sub 'Callback for customButton5 onAction Sub rx_Laskut(control As IRibbonControl) End Sub 'Callback for customButton6 onAction Sub rx_Apu(control As IRibbonControl) End Sub and then they should run properly (I didn't test them) Michel "hbj" a écrit dans le message de groupe de discussion : ... I have made a ribbon addition with UIEditor for Excel 2007: ------------------- <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" <ribbon <tabs <tab id="customTab" label="IK-Lehti" <group id="customGroup" label="IK-Lehti" <button id="customButton1" label="Lisää" size="large" onAction="AddSaaja" imageMso="OutlineExpand" / <button id="customButton2" label="Keskeytä" size="large" onAction="Paattyy" imageMso="MailMergeGotToLastRecord" / <button id="customButton3" label="Poista" size="large" onAction="Poista" imageMso="TableDeleteRows" / <button id="customButton4" label="Tarrat" size="large" onAction="Tarrat" imageMso="EnvelopesAndLabels" / <button id="customButton5" label="Laskut" size="large" onAction="Laskut" imageMso="DollarSign" / <button id="customButton6" label="Apu" size="large" onAction="Apu" imageMso="Help" / </group </tab </tabs </ribbon </customUI ------------------------- The first two macros and the last run without problem. Macros 3,4 and 5 give an error message like: "Cannot run macro POISTA. Maybe macro is not available in this workbook or macros are disabled". The first three macros are in the same module and given names as "Sub POISTA(Optional control As IRibbonControl)". It appears to me that something is wrong with the modules, because I am not able to debug some of the macros with step into (f8). Thankful for any help Håkan I decided to solve the problem the easy and dirty way: Added pushbuttons to the worksheet. Not clever but works. Håkan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need Help: Strange, Strange Behavior ( Not Me. My Model! ) | Excel Programming | |||
Is there a step by step procedure on macros? | Excel Discussion (Misc queries) | |||
VBA - Strange behavior | Excel Programming | |||
Strange behavior | Setting up and Configuration of Excel | |||
running macro step by step different from normal run?? | Excel Programming |