Applies To
Toolbar Object.
Description
Returns or sets how the toolbar is protected from changes by the user, as shown in the following table (in order from minimum to maximum protection). This property is available only in Microsoft Excel for Windows 95. Read-write.
Value |
Meaning |
xlNormal |
Normal toolbar behavior. The toolbar can be moved, resized, and docked. Toolbar buttons can be added, removed, and repositioned. |
xlNoButtonChanges |
The toolbar can be moved, resized, and docked. Toolbar buttons cannot be added, removed, or repositioned. |
xlNoShapeChanges |
Same as xlNoButtonChanges, but the toolbar cannot be resized. The toolbar can be moved and docked. |
xlNoDockingChanges |
Same as xlNoShapeChanges, but the toolbar cannot be docked or undocked. The toolbar can be moved. |
xlNoChanges |
Same as xlNoDockingChanges, but the toolbar cannot be moved. |
Remarks
This property is saved with the toolbar configuration file and recalled for each Microsoft Excel session.
New toolbars are always created with the protection set to xlNormal.
Example
This example sets the protection for My Custom Toolbar. The toolbar can be moved, resized, and docked, but the toolbar buttons cannot be added, removed, or repositioned.
Toolbars("My Custom Toolbar").Protection = xlNoButtonChanges