+ Reply to Thread
Results 1 to 2 of 2

Macro to search folder including subfolders for file and open

  1. #1
    Registered User
    Join Date
    09-01-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Macro to search folder including subfolders for file and open

    Hi,

    I'm trying to make a macro that searches through a master folder and its subfolders for a files that start with the Code (eg: Code123) where the 123 are what users would input through the inputbox function. Using the code provided by jbeaucaire to loop through subfolders some time ago, I tried to incorporate inputbox into it but the macro would simply run and do nothing. How do I make it loop through each subfolder to look for a certain code number until the code is found and opened? The code i have is as below:

    Please Login or Register  to view this content.
    I tried using a more straight forward approach but the code didnt work.

    Please Login or Register  to view this content.
    This is my first try at VB. Advices are greatly appreciated.

    Thanks a lot.

    Sam.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to search folder including subfolders for file and open

    Please Login or Register  to view this content.
    Last edited by patel45; 09-01-2012 at 02:50 PM.
    If solved remember to mark Thread as solved

+ 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