The code below create dynamic menu with checkboxes. Each time the user must select the menu to select an item. I would like to avoid that and click only one time on the nenu.
Here the xml
<dynamicMenu id="MnuSelectOtherDB"
label="Select Other Databases"
getContent="GetContentCallback"/>
Here the VBA code
Sub GetContentCallback(control As IRibbonControl, _
ByRef XMLString)
' Callback get the selected datbases
Dim lngDummy As Long
Dim strDummy As String
Dim strContent As String
strDummy = "<menu xmlns=""http://schemas.microsoft"
strDummy = strDummy & ".com/office/2006/01/customui"">"
For lngDummy = 0 To 5
strContent = strContent & _
"<checkBox id=""MyDynaCheckbox" & lngDummy & _
""" label =""Dynamic Item" & _
lngDummy & """/>"
Next
strDummy = strDummy & strContent & " </menu>"
XMLString = strDummy
End Sub
Here screen shots
Here video of the issue Dynamic menu on ribbon