PC Review


Reply
Thread Tools Rate Thread

Copy Worksheet with Named Ranges

 
 
KC Rippstein hotmail com>
Guest
Posts: n/a
 
      5th Jun 2008
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?
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      5th Jun 2008
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 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
 
Reply With Quote
 
KC Rippstein hotmail com>
Guest
Posts: n/a
 
      7th Jun 2008
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 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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to copy a worksheet containing named ranges to anotherworksheet cil9mxm Microsoft Excel Worksheet Functions 1 3rd Dec 2008 06:06 PM
Copy worksheet with named ranges to new workbook and keep names in Sandy Microsoft Excel Programming 1 11th Jul 2008 07:23 PM
Copy worksheet with named ranges to new workbook and keep names Sandy Microsoft Excel Worksheet Functions 0 11th Jul 2008 04:37 PM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Microsoft Excel Programming 3 24th Dec 2007 01:15 PM
Copy data in named ranges to a newer version of the same template to identical ranges handstand Microsoft Excel Programming 0 21st Aug 2006 03:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 PM.