DisableCustomize Property

Microsoft Office Visual Basic

expression.DisableCustomize

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example toggles the DisableCustomize property.

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