+ Reply to Thread
Results 1 to 2 of 2

Loop through subfolders

  1. #1
    Registered User
    Join Date
    03-02-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    2

    Loop through subfolders

    Hello,

    I have made a code to search for a certain string inside excel files that are in a cetain folder.
    I'm ok untll here but th problem is that I also want to search inside excel files that are also on subfolders inside that first folder.

    The code needs to look for the strin on the first excel file:
    - If found than stop the macro
    - If not found than lmove to next file.
    - If not found on any files on the main folder, than start searching on subfolders, and so on.

    Thank you

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Loop through subfolders

    This should get you close
    Please Login or Register  to view this content.
    Last edited by Solus Rankin; 03-11-2014 at 04:30 PM.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

+ 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. Loop trough all folders and subfolders and copy data
    By forfiett in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2013, 10:22 AM
  2. loop macro to different subfolders
    By jeffgriffin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-24-2013, 10:34 AM
  3. Macro to Loop within all subfolders in a folder in three levels
    By sarakhalatbari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2011, 06:20 AM
  4. Loop Thru Wkbks in folder and subfolders
    By Diddy in forum Excel General
    Replies: 2
    Last Post: 10-19-2011, 02:25 PM
  5. Macro to loop through subfolders within a root folder upto one level only
    By Roop in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-20-2011, 10:01 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