+ Reply to Thread
Results 1 to 6 of 6

Open another workbook find match copy row to open workbook.

  1. #1
    Registered User
    Join Date
    07-08-2009
    Location
    Gloucestershire, England
    MS-Off Ver
    Excel 2007
    Posts
    29

    Open another workbook find match copy row to open workbook.

    Hello, I found some code that generally does what I want it to do but I need to open another workbook as the source rather than a sheet from the active workbook. I keep reading that I can't have two active workbook so not sure how to adapt this code.

    Please Login or Register  to view this content.
    The source workbook is always in the same directory with a name that doesn't change. Also I'd like to change the C value to the value of a cell in the destination worksheet.

    Thank you for taking the time to read this and for any help or advice.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Open another workbook find match copy row to open workbook.

    Code has to run from target or source workbook ?

    Kind regards
    Leo

  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,153

    Re: Open another workbook find match copy row to open workbook.

    Quote Originally Posted by skyblues View Post
    ... I need to open another workbook as the source rather than a sheet from the active workbook ...
    The source workbook is always in the same directory with a name that doesn't change.
    ???
    Try, adapt code:
    Please Login or Register  to view this content.
    Quote Originally Posted by skyblues View Post
    ...Also I'd like to change the C value to the value of a cell in the destination worksheet.
    Which cell (you are copying the entire row of cells) ?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,560

    Re: Open another workbook find match copy row to open workbook.

    skyblues,

    Perhaps
    1) If other Source workbook is open
    Please Login or Register  to view this content.
    if not open
    Please Login or Register  to view this content.
    2) If you want to change criteria, i,e, 17513 to cell reference then something like
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Open another workbook find match copy row to open workbook.

    Please Login or Register  to view this content.
    Kind regards
    Leo

  6. #6
    Registered User
    Join Date
    07-08-2009
    Location
    Gloucestershire, England
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Open another workbook find match copy row to open workbook.

    Thank you all for the replies. I will look at in more detail.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Open 2nd workbook find matching worksheet names and copy values to 1st workbook
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-09-2017, 10:22 AM
  2. Macro VBA to copy and paste cells from one open workbook to another open workbook
    By bloomingcarrot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2014, 07:55 PM
  3. macro to copy cells(Range) from an open Workbook to another open Workbook.
    By jbester in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2013, 09:47 AM
  4. Macro to open a closed workbook and select copy cells into an open workbook
    By helloganesh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2013, 02:00 PM
  5. [SOLVED] Macro to copy data from open workbook to next open line of new workbook
    By nhtodd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 09:42 PM
  6. Save an open workbook, then open template workbook and close the saved workbook
    By ondvirg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2009, 10:20 PM
  7. Open workbook macro- find correct month to open?
    By buzzharley in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-07-2006, 11:30 PM

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