Skip to main content

IRibbonUI.InvalidateControlMso method

Used to invalidate a built-in control.

Syntax

expression.InvalidateControlMso (ControlID)

expression An expression that returns an IRibbonUI object.

Parameters

Name Required/Optional Data type
ControlID Required String

Return value

Nothing

Remarks

Invalidating a control repaints the screen and causes any callback procedures associated with that control to execute.

Example

<customUI … OnLoad="MyAddInInitialize" …>
Sub MyAddInInitialize(Ribbon As IRibbonUI)
    Set MyRibbon = Ribbon
End Sub
 
Sub myFunction()
    MyRibbon.InvalidateControlMso ("TabInsert") ' Invalidates the Insert control
End Sub

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>