View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Péhemme Péhemme is offline
external usenet poster
 
Posts: 2
Default Running macros from UIeditor ribbon - Strange Step Into behavior

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