dicolas, I think you need the RefersTo... methods with the Name property.
Sub AnExample()
Range("A10:B11".Select
ActiveWorkbook.Names.Add Name:="ThisRange", RefersToR1C1:="=Sheet1!R79C3:R84C3"
Range("A1".Select
Range("ThisRange".Select
'I borrowed the following from the Help File...
p = Names("Print_Area".RefersToRange.Value
MsgBox "Print_Area: " & UBound(p, 1) & " rows, " & _
UBound(p, 2) & " columns"
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.