Share via


CommandBars.DisableCustomize Property

Office Developer Reference

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

Aa432260.vs_note(en-us,office.12).gif  Note
The use of CommandBars in some Microsoft Office applications has been superseded by the new Ribbon user interface. For more information, search help for the keyword "Ribbon."

Syntax

expression.DisableCustomize

expression   A variable that represents a CommandBars object.

Example

The following example switches the DisableCustomize property on or off.

Visual Basic for Applications
  Sub ToggleCustomize()
    With Application.CommandBars
        If .DisableCustomize = True Then
            .DisableCustomize = False 
        Else
            .DisableCustomize = True 
        End If
    End With
End Sub

See Also