+ Reply to Thread
Results 1 to 2 of 2

Named Range in ANOTHER workbook

  1. #1
    frtklau
    Guest

    Named Range in ANOTHER workbook


    hi
    I have defined many NamedRanges in 2 workbooks. and copying between
    NamedRange(s) between the 2 workbooks is desired.

    I have a need to access THOSE NamedRanges from the 3rd book, thus I
    need some reference method like:
    wb_s.range("ThisRange")
    wb_t.range("ThatRange")
    <do not prefer BOOK.SHEET.RANGE way>

    so that I can do
    dim A as Variant
    A = wb_s.range("From")
    wb_t.range("To")=A

    if refencing like BOOK.Range(Name) is not feasible, then
    dim A as Variant
    wb_s.activate
    A = range("From")
    wb_t.activate
    range("To")=A
    but this is not clean.

    Is Book.Range("MyName") possible?

    Frankie.


    --
    frtklau

  2. #2
    Dave Peterson
    Guest

    Re: Named Range in ANOTHER workbook

    maybe:

    Dim myBook As Workbook
    Set myBook = Workbooks("book2.xls")

    myBook.Names("thisrange").RefersToRange.Copy _
    Destination:=ActiveSheet.Range("a1")



    frtklau wrote:
    >
    > hi
    > I have defined many NamedRanges in 2 workbooks. and copying between
    > NamedRange(s) between the 2 workbooks is desired.
    >
    > I have a need to access THOSE NamedRanges from the 3rd book, thus I
    > need some reference method like:
    > wb_s.range("ThisRange")
    > wb_t.range("ThatRange")
    > <do not prefer BOOK.SHEET.RANGE way>
    >
    > so that I can do
    > dim A as Variant
    > A = wb_s.range("From")
    > wb_t.range("To")=A
    >
    > if refencing like BOOK.Range(Name) is not feasible, then
    > dim A as Variant
    > wb_s.activate
    > A = range("From")
    > wb_t.activate
    > range("To")=A
    > but this is not clean.
    >
    > Is Book.Range("MyName") possible?
    >
    > Frankie.
    >
    > --
    > frtklau


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1