Lock or unlock shapes

Protect all shapes in a specified worksheet

To protect all shapes in a specified worksheet, use the Worksheet.Protect(ProtectionType) method, as shown in the following sample code.

Unlock specified shapes in a protected worksheet

To unlock a specified shape in a protected worksheet, use shape.IsLocked and shape.SetIsLocked, as shown in the following sample code.

Note: shape.IsLocked and shape.SetIsLocked are meaningful only when the worksheet is protected.