Workbook.Names property (Excel)
Returns a Names collection that represents all the names in the specified workbook (including all worksheet-specific names). Read-only Names object.
expression A variable that represents a Workbook object.
Using this property without an object qualifier is equivalent to using ActiveWorkbook.Names.
This example defines the name myName for cell A1 on Sheet1.
ActiveWorkbook.Names.Add Name:="myName", RefersToR1C1:= _ "=Sheet1!R1C1"
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.