Names Property

Applies To

Application object, Workbook object, Worksheet object.

Description

Application object: Returns a Names collection that represents all the names in the active workbook. Read-only.

Workbook object: Returns a Names collection that represents all the names in the specified workbook (including all worksheet-specific names). Read-only.

Worksheet object: Returns a Names collection that represents all the worksheet-specific names (names defined with the "WorksheetName!" prefix). Read-only.

Remarks

Using this property without an object qualifier is equivalent to using ActiveWorkbook.Names.

Example

This example defines the name "myName" for cell A1 on Sheet1.

ActiveWorkbook.Names.Add Name:="myName", RefersToR1C1:= _
    "=Sheet1!R1C1"