Skip to main content

Worksheet.Names property

Table of contents
  1. Syntax
  2. Remarks
  3. Example

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

Syntax

expression.Names

expression A variable that represents a Worksheet object.

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"

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>