+ Reply to Thread
Results 1 to 5 of 5

Search for files with inputbox and wildcards

  1. #1
    Registered User
    Join Date
    04-16-2014
    Location
    Antwerp, Belgium
    MS-Off Ver
    Excel 2013
    Posts
    8

    Search for files with inputbox and wildcards

    Hello Everyone,

    I would like to know if there is any way to list up files in folders and subfolders with a value given from an inputbox.

    Example: I have an article 1025625 which is part of a filename in multiple folders, all under the same Mainfolder. I want Excel to give me the path of these files. I have tried this, but this gives me blanks:

    Please Login or Register  to view this content.
    Many thanks!

    Qontrol

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search for files with inputbox and wildcards

    Hi I did something like this last week. But only for a folder not sub folders.

    Take a look at at it while I ponder the sub folder situation.

    For some reason I cannot post that workbook as a complete entity.


    Paste this code into normal macro module
    Create a Userform with Two Text boxes and a command button across the top
    and a wide list box below them.

    Please Login or Register  to view this content.

    This is the Userform Code:

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search for files with inputbox and wildcards

    I just found this on the net, it didn't work until I modified it a bit.

    But It lists all Files in the Folder and Sub Folders:

  4. #4
    Registered User
    Join Date
    04-16-2014
    Location
    Antwerp, Belgium
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Search for files with inputbox and wildcards

    Hi,

    Thank you. But how can I search for a part of a file first instead of giving them all at once? Like the one with the userform. I am just starting to do vba so...

    Thank you.

    Regards,

    Qontrol

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search for files with inputbox and wildcards

    This is the best file that I could find on the net.

    http://www.learnexcelmacro.com/wp/20...d-sub-folders/

    I think that if I added the userform type code to this then it would be perfect.

    Ok Try the attached File.
    Attached Files Attached Files
    Last edited by mehmetcik; 05-04-2015 at 04:25 PM.

+ 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. Using Wildcards to Search Data
    By jsgray in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2010, 02:10 PM
  2. How to refer to files using wildcards?
    By valeous in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2010, 05:27 PM
  3. Using Arrays and wildcards to search
    By Maudise in forum Excel General
    Replies: 7
    Last Post: 08-10-2010, 11:47 AM
  4. SEARCH with wildcards
    By Brelin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-25-2009, 08:38 AM
  5. IF, Wildcards and Search Oh-My
    By Dregun in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-04-2008, 03:26 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