Aracılığıyla paylaş


WorkbookBase.ProtectWindows Özellik

Çalışma kitabı pencerelerini korumalı olup olmadığını gösteren bir değeri alır.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel.v4.0.Utilities (Microsoft.Office.Tools.Excel.v4.0.Utilities.dll içinde)

Sözdizimi

'Bildirim
Public ReadOnly Property ProtectWindows As Boolean
    Get
public bool ProtectWindows { get; }

Özellik Değeri

Tür: System.Boolean
true çalışma kitabı Korumalı pencereler, Aksi takdirde, false.

Örnekler

Aşağıdaki kod örneği Protect yöntemine koruma yapısı çalışma kitabı ve çalışma kitabı pencerelerini, ancak belirtmeden parola koruması. Örnek daha sonra değerleri denetler ProtectStructure ve ProtectWindows özelliklerini doğrulamak bu koruma olduğu kümesi.

Bu örnek, bir belge düzeyinde özelleştirme için bulunur.

Private Sub ProtectWorkbook()
    Me.Protect(Structure:=True, Windows:=True)

    If Me.ProtectStructure Then
        MsgBox("You cannot add, delete or change the location " & _
            "of sheets in this workbook.")
    End If

    If Me.ProtectWindows Then
        MsgBox("You cannot arrange windows in this workbook.")
    End If
End Sub
private void ProtectWorkbook()
{
    this.Protect(missing, true, true);

    if (this.ProtectStructure)
    {
        MessageBox.Show("You cannot add, delete or change the location " +
            "of sheets in this workbook.");
    }

    if (this.ProtectWindows)
    {
        MessageBox.Show("You cannot arrange windows in this workbook.");
    }
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

WorkbookBase Sınıf

Microsoft.Office.Tools.Excel Ad Alanı