Results 1 to 16 of 16

search folder for file

Threaded View

  1. #1
    Registered User
    Join Date
    02-25-2007
    Posts
    34

    search folder for file

    I'm using Excel 2007, so no .filesearch

    I want to search a folder for a file containing a certain phrase. Would like to use a case option like in java.

    search for file containing "aaa", "bbb", "ccc", or "ddd"

    then if file exists

    Select Case True
        Case file contains "aaa"
            Run macro aaa
        Case file contains "bbb"
            Run macro bbb
        ...
    End Select
    -I'm not sure the correct syntax for the above.

    This is gonna be a long process to get the code where I want it, but I taking one step at a time, so I understand what is happening and I can change if I need.

    TIA

    Wanted to add that the folder can be set to only have 1 file, but would like to be able to have multiple files while testing.
    Last edited by Jay59; 12-31-2008 at 12:40 PM. Reason: added note

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