Lock or unlock shapes

Protect all shapes in a specified worksheet

To protect all shapes in a specified worksheet, use the Worksheet.protect(int type) 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.setLocked, as shown in the following sample code.

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