Scope of range names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to be able to change the scope of a name from global to local, so that
I can create new ranges on other sheets in the same workbook with the same
name. How can I manage the scope of named ranges inside excel?
 
Sub MakeLocal()
Dim sName As String
Dim rng As Range
sName = "NameRange1"
Set rng = ThisWorkbook.Names(sName).RefersToRange
ThisWorkbook.Names(sName).Delete
rng.Parent.Names.Add Name:=sName, RefersTo:= _
rng.Address(1, 1, xlA1, True)
End Sub
 
That name manager can dump all the names to a new worksheet.

You can print that worksheet if you want.
 
Back
Top