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