Protect Workbook Dialog

The Protect Structure and Windows dialog allows the end-user to protect the workbook. Workbook protection prevents end-users from changing a workbook's structure (by moving, deleting, adding, hiding or displaying a hidden worksheet) or window position (by freezing or unfreezing panes). Using a password is optional.

Protect_Workbook

To invoke this dialog, on the Review tab, in the Changes group, click Protect Workbook.

SpreadsheetControl_Review_Changes

In a protected workbook, this button displays the "Unprotect Workbook" caption, which invokes a simple dialog that prompts for a password or unlocks the workbook if an empty password was set.

For an example on how to provide a Ribbon UI for the SpreadsheetControl, refer to the Getting Started topic.

To programmatically protect a workbook's structure and windows, use the IWorkbook.Protect method. To remove protection, use the IWorkbook.Unprotect method.