WorkbookBase.ProtectStructure Özellik
Çalışma kitabındaki sayfaların sırasını 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 ProtectStructure As Boolean
Get
public bool ProtectStructure { get; }
Özellik Değeri
Tür: System.Boolean
true çalışma kitabındaki sayfaların sırasını korunmuşsa; 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
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.