'Declaration
Public Function Protect( _ ByVal locks As WorksheetLocks, _ Optional ByVal password As String _ ) As Boolean
'Usage
Dim instance As Worksheet Dim locks As WorksheetLocks Dim password As String Dim value As Boolean value = instance.Protect(locks, password)
public bool Protect( WorksheetLocks locks, string password )
Parameters
- locks
- A WorksheetLocks value indicates which data will be protected.
- password
- A string that specifies a case-sensitive password for the worksheet.
Return Value
true
if the worksheet is protected successful, false
otherwise.