Udostępnij za pośrednictwem


Workbook.Permission Property (2007 System)

Gets a Microsoft.Office.Core.Permission object that represents the permission settings in the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Permission As Permission
'Usage
Dim instance As Workbook 
Dim value As Permission 

value = instance.Permission
[BrowsableAttribute(false)]
public Permission Permission { get; }
[BrowsableAttribute(false)]
public:
property Permission^ Permission {
    Permission^ get ();
}
public function get Permission () : Permission

Property Value

Type: Permission
A Microsoft.Office.Core.Permission object that represents the permission settings in the workbook.

Examples

The following code example uses the Permission property to display a message if permissions are not enabled on the current workbook.

This example is for a document-level customization.

Private Sub DisplayPermission()
    If Not Me.Permission.Enabled Then
        MsgBox("Permissions are not enabled on the current workbook.")
    End If 
End Sub
private void DisplayPermission()
{
    if (!this.Permission.Enabled)
    {
        MessageBox.Show("Permissions are not enabled on the current workbook.");
    }
}

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace