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
Get
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.