Excel VisualBasic Script

Sub AddName1()
   ActiveSheet.Names.Add Name:="MyRange1", RefersTo:="=$A$1:$B$10"
End Sub