Name Name Name Interface

Definition

Represents a defined name for a range of cells.

public interface class Name
[System.Runtime.InteropServices.Guid("000208B9-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Name
Public Interface Name
Attributes

Remarks

Names can be either built-in names — such as Database, Print_Area, and Auto_Open — or custom names.

Application, Workbook, and Worksheet Objects

The Name object is a member of the Names collection for the Application, Workbook, and Worksheet objects. Use Names(index), where index is the name index number or defined name, to return a single Name object.

The index number indicates the position of the name within the collection. Names are placed in alphabetic order, from a to z, and are not case-sensitive (this is the same order as is displayed in the Define Name and Apply Names dialog boxes, returned by clicking the Name command on the Insert menu).

Use the Name property to return or set the text of the name itself.

Range Objects

Although a Range object can have more than one name, there’s no Names collection for the Range object. Use Name with a Range object to return the first name from the list of names (sorted alphabetically) assigned to the range.

Properties

_Default _Default _Default

Reserved for internal use.

Application Application Application

Returns an Application object that represents the Microsoft Excel application.

Category Category Category

Returns or sets the category for the specified name in the language of the macro.

CategoryLocal CategoryLocal CategoryLocal

Returns or sets the category for the specified name, in the language of the user, if the name refers to a custom function or command.

Comment Comment Comment

Returns or sets the comment associated with the name. Read/write String.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which this object was created.

Index Index Index

Returns the index number of the object within the collection of similar objects.

MacroType MacroType MacroType

Returns or sets what the name refers to.

Name Name Name

Returns or sets the name of the object.

NameLocal NameLocal NameLocal

Returns or sets the name of the object in the language of the user.

Parent Parent Parent

Returns the parent object for the specified object.

RefersTo RefersTo RefersTo

Returns or sets the formula that the name is defined to refer to, in the language of the macro and in A1-style notation, beginning with an equal sign.

RefersToLocal RefersToLocal RefersToLocal

Returns or sets the formula that the name refers to.

RefersToR1C1 RefersToR1C1 RefersToR1C1

Returns or sets the formula that the name refers to.

RefersToR1C1Local RefersToR1C1Local RefersToR1C1Local

Returns or sets the formula that the name refers to.

RefersToRange RefersToRange RefersToRange

Returns the Range object referred to by a Name object.

ShortcutKey ShortcutKey ShortcutKey

Returns or sets the shortcut key for a name defined as a custom Microsoft Excel 4.0 macro command.

ValidWorkbookParameter ValidWorkbookParameter ValidWorkbookParameter

Returns True if the specified Name object is a valid workbook parameter. Read-only Boolen.

Value Value Value

Returns a string containing the formula that the name is defined to refer to.

Visible Visible Visible

Determines whether the object is visible.

WorkbookParameter WorkbookParameter WorkbookParameter

Returns or sets the specified Name object as a workbook parameter. Read/write

Methods

Delete() Delete() Delete()

Deletes the object.

Applies to