+ Reply to Thread
Results 1 to 4 of 4

VBA Loop for a folder of all the files, Loop all the worksheet in each workbook

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Angry VBA Loop for a folder of all the files, Loop all the worksheet in each workbook

    Hi,

    I want to do loop in a folder of many excel files.

    For each excel files, I want to loop through a tab and search a name of tab.

    In the tab of worksheet I found, I want to find row that has certain title and copy this row to another file with all the return values.


    Thank you.

    Nanjing

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: VBA Loop for a folder of all the files, Loop all the worksheet in each workbook

    Nanjing,

    Welcome to the forum!
    Here's some generic and commented code that should get you started:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-07-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: VBA Loop for a folder of all the files, Loop all the worksheet in each workbook

    Compile error
    Method or data member not found.
    I am using Excel 2010.

    wsData.Find(strTitle , x1Values, x1Part)
    Last edited by nanjingwoodworking; 10-07-2013 at 06:41 PM.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: VBA Loop for a folder of all the files, Loop all the worksheet in each workbook

    Those should be the letter L, not the number 1:
    xlValues, xlPart

    not
    x1Values, x1Part

    Please Login or Register  to view this content.

+ 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. [SOLVED] Loop through multiple files, run macro, then save as Excel workbook in a different folder
    By Peter Kallio in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-26-2013, 11:42 PM
  2. [SOLVED] loop through files in a folder based on partial name from worksheet cell
    By Willardio in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2013, 11:56 AM
  3. Loop between 2 files in a folder
    By jharaldson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2013, 02:33 AM
  4. loop through all files in a folder except for one of them
    By masben in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2013, 10:23 AM
  5. Loop through files in a folder
    By abousetta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2010, 06:03 PM

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