Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Worksheet with Named Ranges
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Worksheet with Named Ranges
Thank you so much, that worked perfectly.
-- Please remember to indicate when the post is answered so others can benefit from it later. "Per Jessen" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
trying to copy a worksheet containing named ranges to anotherworksheet | Excel Worksheet Functions | |||
Copy worksheet with named ranges to new workbook and keep names | Excel Worksheet Functions | |||
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... | Excel Programming | |||
Copy and paste Named Ranges | Excel Programming | |||
Copy data in named ranges to a newer version of the same template to identical ranges | Excel Programming |