BTW, just for info, this is the code I created
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"
onLoad="rxDemoRibbonOnLoad">
<ribbon>
<tabs>
<tab id="tabDemo" label="Demo Ribbon">
<group id="grpDemoGroup1"
label="Initial Group"
visible="true">
<button id="btnDemoShowRest"
onAction="rxDemoShowRest"
label="Show Rest"
imageMso="FileWorkflowTasks"
size="large"
visible="true"
enabled="true" />
</group>
<group id="grpDemoGroup2"
label="Now You See Me"
getVisible="rxDemoGetVisible">
<button id="btnDemoButton1"
onAction="rxDemoButton1"
label="New Button 1"
imageMso="ReviewProtectWorkbook"
size="large"
visible="true"
enabled="true" />
<button id="btnDemoButton2"
onAction="rxDemoButton2"
label="New Button 2"
imageMso="StartTimer"
size="large"
visible="true"
enabled="true" />
<button id="btnDemoButton3"
onAction="rxDemoButton3"
label="New Button 3"
imageMso="FileSaveAsPowerPointPpsx"
size="large"
visible="true"
enabled="true" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Private Sub Workbook_Open()
flgShowRest = False
End Sub
Global flgShowRest As Boolean
Global rxDemoIRibbonUI As IRibbonUI
Public Function rxDemoRibbonOnLoad(ribbon As IRibbonUI)
Set rxDemoIRibbonUI = ribbon
If Val(Application.Version) >= 14 Then rxDemoIRibbonUI.ActivateTab "tabDemo"
End Function
Public Function rxDemoGetVisible(control As IRibbonControl, ByRef Visible)
Select Case control.ID
Case "grpDemoGroup2": Visible = flgShowRest
End Select
End Function
Public Function rxDemoShowRest(control As IRibbonControl)
flgShowRest = Not flgShowRest
rxDemoIRibbonUI.Invalidate
End Function