Condividi tramite


WorkbookBase.VBASigned Property

Gets a value that indicates whether the Visual Basic for Applications project for the workbook has been digitally signed.

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

Syntax

'Declaration
Public ReadOnly Property VBASigned As Boolean
public bool VBASigned { get; }

Property Value

Type: System.Boolean
true if the Visual Basic for Applications project for the workbook has been digitally signed; otherwise, false.

Examples

The following code example uses the VBASigned property to display a message if the Visual Basic for Applications project for the workbook has not been digitally signed.

This example is for a document-level customization.

Private Sub WorkbookVBASigned()
    If Not Me.VBASigned Then
        MsgBox("Warning: This workbook has not been " & _
            "digitally signed.")
    End If 
End Sub
private void WorkbookVBASigned()
{
    if (!this.VBASigned)
    {
        MessageBox.Show("Warning: This workbook has not been " +
            "digitally signed.");
    }
}

.NET Framework Security

See Also

Reference

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace