+ Reply to Thread
Results 1 to 3 of 3

Open Event that lists files names and extracts data from those workbooks

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Lebanon, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    47

    Open Event that lists files names and extracts data from those workbooks

    I am trying to create an open event that will list the workbook names in a defind location (this location will not change and so would be put directly into the code). After listing I want it to extract data in range B4:B11 from each listed workbook and paste each extraction as a value (the extracted data is part of a formula) under its workbook name.

    When I list the workbook name I only need the first 8 characters so I would use left("file name", 8), the name is then listed in a horizontal range starting at "C5". the number of workbooks referenced will be unknown.
    The attched workbook shows the layout that I am working with. Right now I have to open each workbook and manual add the totals into the "master" workbook. this workbook is not in the same location as the referenced workbooks.

    I have some understanding of VBA code but I havent done an open events or an extraction from a closed workbook before.

    Thanks for the help!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-14-2012
    Location
    Lebanon, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Open Event that lists files names and extracts data from those workbooks

    I just found this post which is close to what I want, but instead of a button I want an open event and I want to get data from several "unknown" closed workbooks

    Retrieve Data without opening excel file
    http://www.excelforum.com/excel-prog...xcel-file.html

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Lebanon, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Open Event that lists files names and extracts data from those workbooks

    After taking some code segments from rizmomin's post (http://www.excelforum.com/excel-prog...xcel-file.html) and forcing it together with several of my "old" VBA projects, I was able to get this.
    Please Login or Register  to view this content.
    Which does exactly what I wanted it to, so I've answered my original question.
    Now my question is, can I simplify the code so that it runs faster?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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