+ Reply to Thread
Results 1 to 4 of 4

VBA to Open Multiple Excel Files

  1. #1
    Registered User
    Join Date
    12-05-2010
    Location
    Louisville
    MS-Off Ver
    Excel 2010
    Posts
    2

    VBA to Open Multiple Excel Files

    I have a question regarding a macro that will search a drive for all excel files that start with a given character(s), open that file and pull data from a given tab, close it, and continue the search until all data has been successfully pulled and stored. Any help or suggestions would be great.

    Thanks,

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA to Open Multiple Excel Files

    Hello nrxanders,

    Welcome to the Forum!

    Do you really mean search the drive and all the follders and subfolders on the drive or just search the drive as a single directory, like "C:\".
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-05-2010
    Location
    Louisville
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: VBA to Open Multiple Excel Files

    Thanks!

    Sorry for the confusion, I did mean search all of the folders and sub-folders.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA to Open Multiple Excel Files

    Hello nrxanders,

    there are 2 macros. One is complete and the other is not. The macro to recursively find all files on a drive is finished. The second macro opens the Excel workbooks (.xls or .xlsx), However the code to to retrieve the data and store it is missing. you didn't post that information and I didn't request it. So, you can either add that code or tell me what data you need and where it it will be saved.

    Macro to Recursively List Files
    Please Login or Register  to view this content.

    Macro (incomplete) to Open and Save the Workbook Data
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 12-06-2010 at 06:11 PM. Reason: Corrected typo in a remark

+ 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