When protecting a Sheet, a password is optional. The HasProtectionPassword will return true if the Sheet is currently protected (see IsProtected) and a password was specified when it was protected. To protect a sheet without a password, one may use the Worksheet.Protect method that doesn't take a password. To require a specific password to be entered in order to unprotect the Sheet one could use one of the other overloads that take a pasword (e.g.Unprotect(String)).
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
Sheet Class
Sheet Members
IsProtected Property
WorksheetProtection Class
Protect(Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>) Method
Protect(String,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>) Method
Protect(SecureString,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>) Method
Unprotect Method
Unprotect(String) Method
Unprotect(SecureString) Method