Workbook.Name Property (2007 System)
Gets the name of the workbook.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public ReadOnly Property Name As String
'Usage
Dim instance As Workbook
Dim value As String
value = instance.Name
public string Name { get; }
public:
property String^ Name {
String^ get ();
}
public function get Name () : String
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.