Add Method (Names Collection) Example

This example defines a new name for the range A1:D3 on Sheet1 in the active workbook.

ActiveWorkbook.Names.Add _
    Name:="tempRange", _
    RefersTo:="=Sheet1!$A$1:$D$3"