http://msdn.microsoft.com/en-us/library/aa722523%28office.12%29.aspx
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace" onLoad="rbxLoad">
<ribbon>
<tabs>
<tab idMso="TabAddIns">
<group idQ="x:Contoso" label="Contoso" getVisible="myxx">
<button id="C1" label="Contoso Button 1" size="large"
imageMso="FileSave" onAction="c_action1" />
</group>
<group id="Contoso" label="Contoso2" getVisible="myxx">
<button id="C2" label="Contoso Button 2" size="large"
imageMso="FileSave" onAction="c_action1" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
With the following VBA code
' Code in standard module Public g_rbxUI As IRibbonUI Public g_blnVis As Boolean Sub rbxLoad(ribbon As IRibbonUI) Stop Set g_rbxUI = ribbon End Sub 'Callback for Contoso getVisible Sub myxx(control As IRibbonControl, ByRef returnedVal) MsgBox "Get Visible" returnedVal = g_blnVis End Sub 'Callback for C1 onAction Sub c_action1(control As IRibbonControl) MsgBox "Here" End Sub
' code in Thisworkbook object Private Sub Workbook_SheetActivate(ByVal Sh As Object) g_blnVis = Not g_blnVis g_rbxUI.Invalidate ' also tried invalidating the control
' g_rbxUI.InvalidateControl "Contoso" End Sub
--
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.