Partager via


_Workbook.HasPassword Property

True if the workbook has a protection password. Read-only Boolean.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
ReadOnly Property HasPassword As Boolean
    Get
'Usage
Dim instance As _Workbook
Dim value As Boolean

value = instance.HasPassword
bool HasPassword { get; }

Property Value

Type: System.Boolean

Remarks

You can assign a protection password to a workbook by using the SaveAs method.

See Also

Reference

_Workbook Interface

_Workbook Members

Microsoft.Office.Interop.Excel Namespace