편집

다음을 통해 공유


Names Interface

Definition

A collection of all the Name objects in the application or workbook. Each Name object represents a defined name for a range of cells. Names can be either built-in names — such as Database, Print_Area, and Auto_Open — or custom names.

public interface class Names : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("000208B8-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Names : System.Collections.IEnumerable
Public Interface Names
Implements IEnumerable
Attributes
Implements

Remarks

Use the Names property to return the Names collection.

Use the Add(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) method to create a name and add it to the collection. The Add method's RefersTo argument must be specified in A1-style notation, including dollar signs ($) where appropriate. For example, if cell A10 is selected on Sheet1 and you define a name by using the RefersTo argument "=sheet1!A1:B1", the new name actually refers to cells A10:B10 (because you specified a relative reference). To specify an absolute reference, use "=sheet1!$A$1:$B$1".

Use Names(index), where index is the name index number or defined name, to return a single Name object.

Properties

Application

Returns an Application object that represents the Microsoft Excel application.

Count

Returns the number of objects in the collection. Read-only Integer.

Creator

Returns a 32-bit integer that indicates the application in which this object was created. If the object was created in Microsoft Excel, this property returns the string XCEL, which is equivalent to the hexadecimal number 5843454C. Read-only XlCreator.

Parent

Returns the parent object for the specified object. Read-only.

Methods

_Default(Object, Object, Object)

Reserved for internal use.

Add(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Defines a new name. Returns a Name object.

GetEnumerator()
Item(Object, Object, Object)

Returns a single Name object from a Names collection.

Applies to