Aracılığıyla paylaş


WorkbookBase.ProtectStructure Özellik

Çalışma kitabındaki sayfa sırasını korumalı olup olmadığını gösteren 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 ProtectStructure As Boolean
public bool ProtectStructure { get; }

Özellik Değeri

Tür: System.Boolean
true çalışma kitabındaki sayfa sırasını korunmuş durumdaysa; Aksi halde, false.

Örnekler

Aşağıdaki kod örneğinde Protect , çalışma kitabı ve çalışma kitabı pencerelerini, ancak parola koruması belirtmeden yapısını korumak için yöntem.Örnek daha sonra değerleri denetler ProtectStructure ve ProtectWindows bu koruma ayarlandığını doğrulamak için özellikler.

Bu örnek için belge düzeyi özelleştirmesinde içindir.

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( 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ı