Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Sometimes, you need to protect all shapes in certain worksheets to prevent them from being destroyed by unwanted situations. In this case, you need to lock all shapes in the specified worksheet.
Sometimes, you need to be able to modify certain shapes in certain protected worksheets, in which case, you need to unlock these shapes.
This article will introduce in detail how to lock and unlock specified shapes.
To protect all shapes in a specified worksheet, use the Worksheet.Protect(ProtectionType) method, as shown in the following sample code.
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.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.