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

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace