Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to copy a worksheet containing named ranges to anotherworksheet cil9mxm Excel Worksheet Functions 1 December 3rd 08 06:06 PM
Copy worksheet with named ranges to new workbook and keep names Sandy Excel Worksheet Functions 0 July 11th 08 04:37 PM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Copy and paste Named Ranges Robert H Excel Programming 6 February 6th 07 04:13 PM
Copy data in named ranges to a newer version of the same template to identical ranges handstand Excel Programming 0 August 21st 06 03:51 PM


All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"