Version

HasProtectionPassword Property (Sheet)

Returns a boolean indicating if the Sheet has been protected with a password.
Syntax
'Declaration
 
Public ReadOnly Property HasProtectionPassword As Boolean
public bool HasProtectionPassword {get;}
Remarks

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)).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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

See Also