Syntax

expression.ListNames

expression A variable that represents a Range object.

Return Value
Variant

Remarks

Use the property 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 both workbook-level names and sheet-level names defined on Sheet1.

Visual Basic for Applications
Worksheets("Sheet1").Range("A1").ListNames
Display all names registered on a worksheet? Get list of all named cells and ranges? list names List Names Method listnames ListNames method Paste a list of all names into a range on a sheet?

See also: