ListNames Method

Applies To

Range Object.

Description

Pastes a list of all non-hidden names on the worksheet, beginning at the first cell of the range.

Syntax

object.ListNames

object

Required. Identifies the worksheet for which to list names, and the start of the range where the names will be listed.

Remarks

Use the Names method to return a collection of all the names on a worksheet.

Example

This example pastes a list of defined names into cell A1 on Sheet1. The example pastes workbook-level names and sheet-level names defined on Sheet1.


Worksheets("Sheet1").Range("A1").ListNames