Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

To disable and enable commands you need to get hold of the "ControlDefinition". This property can "Enables/Disables the UIDefinition objects.". That could work like this:

Dim Ribbon As Ribbon = ThisApplication.UserInterfaceManager.Ribbons.Item("Ribbon name")
Dim ribbonTab As RibbonTab = Ribbon.RibbonTabs.Item("Ribbon tab name")
Dim ribbonPanel As RibbonPanel = ribbonTab.RibbonPanels.Item("Ribbon panel name")
Dim commandControl As CommandControl = ribbonPanel.CommandControls.Item("Command controls name")

commandControl.ControlDefinition.Enabled = False

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com