Skip to main content

CommandBars.DisableCustomize property

Table of contents
  1. Syntax
  2. Example

Is True if toolbar customization is disabled. Read/write.

Syntax

expression.DisableCustomize

expression A variable that represents a CommandBars object.

Example

The following example switches the DisableCustomize property on or off.

Sub ToggleCustomize()
    With Application.CommandBars
        If .DisableCustomize = True Then
            .DisableCustomize = False
        Else
            .DisableCustomize = True
        End If
    End With
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>