View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default Copy Worksheet with Named Ranges

On 5 Jun., 19:50, KC Rippstein hotmail com <kcrippstein<atdot wrote:
Hello. *I am trying to copy a worksheet containing a named range to another
workbook. *When I highlight the range in the new workbook, the name dialog
box correctly shows the name of the range, but when I try to Go To that named
range, it's invalid, and when I go to InsertNameDefine the named range
points to =#REF!A2:C29. *In my macro, I even tried to name the range in my
new workbook using ActiveWorkbook.Names.Add as well as
Sheets("Codes").Range("A2:C29").Name = "PropertyCodes". *Both attempts
failed. *Help, please?


Hi

Haven't testet it, but i think you need do delete the names before you
assing them again.

Try this:

ActiveWorkbook.Names("PropertyCodes").Delete

Regards,
Per