Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
hbj hbj is offline
external usenet poster
 
Posts: 35
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
hbj hbj is offline
external usenet poster
 
Posts: 35
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help: Strange, Strange Behavior ( Not Me. My Model! ) SteveM Excel Programming 2 December 16th 07 06:02 PM
Is there a step by step procedure on macros? Bill Excel Discussion (Misc queries) 4 May 10th 07 10:54 PM
VBA - Strange behavior MVM Excel Programming 0 June 12th 06 07:44 PM
Strange behavior DeRussie Setting up and Configuration of Excel 4 November 26th 05 05:41 PM
running macro step by step different from normal run?? Rinze Smit Excel Programming 10 July 26th 05 03:35 PM


All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"