how to set a range in 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")