View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Transfering 100 named ranges to an another workbook

The following will create Named Ranges in destination.xls to match the ones
in source.xls:

Sub namexfr()
wbs = "source.xls"
wbd = "destination.xls"
For Each nam In Workbooks(wbs).Names
Workbooks(wbd).Names.Add Name:=nam.Name, RefersToR1C1:=nam.RefersToR1C1
Next
End Sub
--
Gary''s Student - gsnu200736


"Oldjay" wrote:

It has been suggested to copy each one separately. There must be a better way.

The reason I an doing this is to delete some Menu Items created in Excel97
off of this large workbook. I have tried to use the Add-in that is supposed
to do this but it tells me this "this is not a Excel file". I therefore
created a new workbook and copied all the sheets, formats, comments,
validation and VBA code to the new workbook. All that remains is to import
all of the named ranges.

Can anybody help so that I do not have to create 100 new ranges

oldjay