+ Reply to Thread
Results 1 to 5 of 5

VBA Refer to named range in different workbook

  1. #1
    Registered User
    Join Date
    02-02-2010
    Location
    playa del carmen, mexico
    MS-Off Ver
    ms office 2007
    Posts
    52

    VBA Refer to named range in different workbook

    I have been trying to program a macro, which will check if a value exists within a dynamic named range in a different workbook.
    I had several problems originally with the code for the MATCH part of the code even within same workbook until found the answer to use application.match instead of worksheetfunction.match, but am still having problems with looking into a different workbook.

    Please Login or Register  to view this content.
    I am sure its something simple I am doing wrong - but just havent been able to find the answer.

    Thanks for any help

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: VBA Refer to named range in different workbook

    IMO, using the VBA .Find method is simpler & more effective.

    Look at the example in the VBA Help Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    02-02-2010
    Location
    playa del carmen, mexico
    MS-Off Ver
    ms office 2007
    Posts
    52

    Re: VBA Refer to named range in different workbook

    seems to be equally effective on same workbook, but i think my issue is with the syntax i am using to call the named range from a different workbook

    Please Login or Register  to view this content.
    Is this the correct way to call that range, or is it some form of workbooks("Differentworkbook").range("NamedRange") etc..

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA Refer to named range in different workbook

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Registered User
    Join Date
    02-02-2010
    Location
    playa del carmen, mexico
    MS-Off Ver
    ms office 2007
    Posts
    52

    Re: VBA Refer to named range in different workbook

    ok thanks guys

+ 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