Export (0) Print
Expand All
Expand Minimize

Range.Name Property 

Returns or sets the name of the object.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim range1 As Range

Dim returnValue As Object
returnValue = range1.Name

Dim sampleValue As Object
range1.Name = sampleValue

'Declaration
Property Name() As Object
public System.Object get_Name();
public void set_Name(System.Object);
function get Name() : Object;
function set Name(Object);

The name of a Range object is a Name object. For every other type of object, the name is a String.

The following table shows example values of the Name property and related properties given an OLAP data source with the unique name "[Europe].[France].[Paris]" and a non-OLAP data source with the item name "Paris".

Property

Value (OLAP data source)

Value (non-OLAP data source)

Caption

Paris

Paris

Name

[Europe].[France].[Paris] (read-only)

Paris

SourceName

[Europe].[France].[Paris] (read-only)

(Same as SQL property value, read-only)

Value

[Europe].[France].[Paris] (read-only)

Paris

When specifying an index into the PivotItems collection, you can use the syntax shown in the following table.

Syntax (OLAP data source)

Syntax (non-OLAP data source)

expression.PivotItems("[Europe].[France].[Paris]")

expression.PivotItems("Paris")

When using the Item property to reference a specific member of a collection, you can use the text index name as shown in the following table.

Name (OLAP data source)

Name (non-OLAP data source)

[Europe].[France].[Paris]

Paris


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft