Excel 2007 adds display but does not work

I created an Excel Addin that appears in the user interface, but whenever I click on it, it does not work.

Option Explicit Public sheetscol As Collection, depshtnm Public hasdeps As Boolean '*********************************** '*finds the external dependencies of the cell, and places them in the 'sheetscol' collection '*********************************** Sub depfinder_eventhandler(control As IRibbonControl) depfinder End Sub '-------------- Sub depfinder ... End sub 

This is the XML CustomUI:

 <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:m="MattSinSpace"> <ribbon> <tabs> <tab idQ="m:MattTab" label="Matt Tools" insertAfterMso="TabHome"> <group idQ="m:migration" label="migration tools"> <button idQ="m:DepFinderButton1" label="Highlight Dependencies" size="large" onAction="depfinder_eventhandler" imageMso="HappyFace" /> </group> <group idQ="m:RS1" visible = "false"/> <group idQ="m:RS2" visible = "false"/> </tab> </tabs> </ribbon> </customUI> 

I am very amateur in creating add-ons and I used this page to help me:

http://erpcoder.wordpress.com/2012/05/30/how-to-create-a-custom-ribbon-addin-for-excel-2010/

Everything seems to be in order, in my code and my user interface, the only difference is that I included the namespace.

+7
source share
1 answer

Your problem is XML for the group and buttons. You are using idQ, which is the qualifier identifier used when sharing add-on controls. You want this on a tab, since you can share a tab between add-ons, but not a group or buttons. The following XML will work:

 <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:m="MattSinSpace"> <ribbon> <tabs> <tab idQ="m:MattTab" label="Matt Tools" insertAfterMso="TabHome"> <group id="migration" label="migration tools"> <button id="DepFinderButton1" label="Highlight Dependencies" size="large" onAction="depfinder_eventhandler" imageMso="HappyFace" /> </group> <group id="RS1" visible = "false"/> <group id="RS2" visible = "false"/> </tab> </tabs> </ribbon> 

+5
source

All Articles