Partager via


WorkbookBase.Name Property

Gets the name of the workbook.

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 Name As String
public string Name { get; }

Property Value

Type: System.String
The name of the workbook.

Examples

The following code example uses the Name property to display the name of the current workbook.

This example is for a document-level customization.

Private Sub DisplayWorkbookName()
    MsgBox("The name of the current workbook is " & _
        Me.Name)
End Sub
private void DisplayWorkbookName()
{
    MessageBox.Show("The name of the current workbook is " +
        this.Name);
}

.NET Framework Security

See Also

Reference

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace