Copy Worksheet with Named Ranges

  • Thread starter KC Rippstein hotmail com>
  • Start date
K

KC Rippstein hotmail com>

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 Insert>Name>Define 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?
 
P

Per Jessen

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 Insert>Name>Define 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top