View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JLatham
 
Posts: n/a
Default Tranferring names defined in one excel workbook to another workboo

Both workbooks need to have same sheet names in order for this to work
without error when you try to reference the named ranges in the second
workbook. Put this code in the workbook with the names already defined.
Open up the second workbook and then run the macro:

Sub CopyNamedNamedRanges()
Dim AnyName As Object

For Each AnyName In ThisWorkbook.Names
Workbooks("Book2.xls").Names.Add AnyName.Name, AnyName.RefersTo, True
Next

End Sub

Change "Book2.xls" to the name of the workbook you need to move the named
ranges into.


"Dinesh" wrote:

I defined some names using name manager in One Excel workbook . i want to
transfer all the namespaces into another workbook.
How can i do that ?