You have a space (before customui) in the xmlns attribute of the xml you show.
With that fixed, it works fine on my machine.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Note that you can enable error reporting for such errors in the xml, by enabling the option “Show add-in user interface errors”

Then you’ll see this message with the problematic xml:

//Ribbon
[ComVisible(true)]
public class MyRibbon : ExcelRibbon
{
private static IRibbonUI _ribbonUi;
// This ribbon xml can be returned in code, or placed in the .dna file
public override string GetCustomUI(string uiName)
{
return
@"
<customUI onLoad='Ribbon_Load' xmlns='http://schemas.microsoft.com/office/2006/01/customui'>
<ribbon>
<tabs>
<tab idMso='TabAddIns'>
<group id='group1' label='Group1'>
<button getEnabled='btn_GetEnabled' getLabel='btn_GetLabel' size='large' onAction='RunTagMacro' id='Query' tag='btn_Query' />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
";
}
public void Ribbon_Load(IRibbonUI sender)
{
_ribbonUi = sender;
}
public bool btn_GetEnabled(IRibbonControl control)
{
return true;
}
public string btn_GetLabel(IRibbonControl control)
{
return control.Id;
}
public static void Refresh()
{
if (_ribbonUi != null) { _ribbonUi.Invalidate(); }
}
// Execute the different actions depending on the button clicked
public static void btn_Query()
{
Query.Create_tables(); //Method call
}
}