add namend range vba code example
Example: vba set named range
' Scope.Names.Add Name:=RangeName, RefersTo:=NamedRange
'Example:
ThisWorkbook.Names.Add Name:="myRangeName", RefersTo:=Range("A1")
' Scope.Names.Add Name:=RangeName, RefersTo:=NamedRange
'Example:
ThisWorkbook.Names.Add Name:="myRangeName", RefersTo:=Range("A1")