vba change named range address

The solution for “vba change named range address” can be found here. The following code will assist you in solving the problem.

Dim wb As Workbook
Dim nr As Name

Set wb = ActiveWorkbook
Set nr = wb.Names.Item(“myRange”)

‘ give an absolute reference:
nr.RefersTo = “=Sheet1!$C$1:$C$9”

‘ or, resize relative to old reference:
With nr
.RefersTo = .RefersToRange.Resize(100, 1)
End With

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts