Jul 27, 2012 at 10:03 AM
Edited Jul 27, 2012 at 10:07 AM
Just Start working with Excel-DNA.
Now i need to change the Label/Text of a ribbon button on the click event.
I've tried define in xml :
and the method's (in the end):
In first Load of Excel, the label is defined correct, but after click event , no changes.
I See this Discussion -> http://exceldna.codeplex.com/discussions/350836/ and i understand i need invalidate the control, to unsure that it update, but i can't find a way to get a handle to the ribbonUI.
private bool _tbstate = false;
public string GetLabel(IRibbonControl control)
if (_tbstate == true)
return "Ocultar Congeladas";
return "Mostrar Congeladas";
public void myToggleButton(IRibbonControl control, bool state)
_tbstate = state;