Name Property

Applies To

AddIn object, Application object, AxisTitle object, Chart object, ChartArea object, ChartObject object, ChartTitle object, Corners object, CustomView object, DataLabel object, DataLabels collection object, DownBars object, DropLines object, ErrorBars object, Floor object, Font object, Gridlines object, HiLoLines object, Hyperlink object, Legend object, Name object, OLEObject object, Parameter object, PivotField object, PivotItem object, PivotTable object, PlotArea object, QueryTable object, Range object, RecentFile object, Scenario object, Series object, SeriesLines object, Shape object, ShapeRange collection object, Style object, TickLabels object, Trendline object, UpBars object, Walls object, Workbook object, Worksheet object.

Description

Returns or sets the name of the object. The name of a Range object is a Name object. For every other type of object, the name is a string.

See Also

NameLocal property.

Example

This example displays the name of style one in the active workbook, first in the language of the macro and then in the language of the user.

With ActiveWorkbook.Styles(1)
    MsgBox "The name of the style is " & .Name
    MsgBox "The localized name of the style is " & .NameLocal
End With