+ Reply to Thread
Results 1 to 9 of 9

FileSearch not returning results?

  1. #1
    Registered User
    Join Date
    02-27-2008
    Location
    Irving, Texas
    MS-Off Ver
    MS Office 2016
    Posts
    96

    Red face FileSearch not returning results?

    I have a script which takes inputs from 2 cells for the desired search directory and part of the file name, i.e. C:\My_Dir\, my_file*. From these inputs, it does some data manipulation and re-formats the original .xls files indicated to only show the desired information. I did not develop this script, I simply inherited it from a coworker who no longer is with our company. This script worked perfectly until about 2 weeks ago. At that time, I added one or two add-ins which I found from other sources and seemed useful to me. I also feel like I turned on some option for VB, but I can't recall what it was so I can't reset it.

    After that, the data formatting script stopped working. I can't remember which add-ins I got, though I should be able to figure it out w/ enough detective work. I'm also only 98% sure that that was the cause of my problems, it may have been a coincidence. When I set the input cells to reflect a known good directory with a known good partial file name, the script fails to detect files matching the pattern, and reports no files found. I have to believe that this is some problem that's got to do with references, or the option I turned on, or something external to the script, because the script never got modified. If I run the same script from a different machine on the same data, it works just as expected.

    Can anyone help me figure out what got messed up for my machine and how to fix it?

    I've included most of the script below to help any generous troubleshooters out there.

    Please Login or Register  to view this content.
    -Adam Hartman
    Mechanical Engineer

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: FileSearch not returning results?

    Which version of Excel are you using?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    02-27-2008
    Location
    Irving, Texas
    MS-Off Ver
    MS Office 2016
    Posts
    96

    Re: FileSearch not returning results?

    Quote Originally Posted by royUK View Post
    Which version of Excel are you using?
    Roy,

    I'm using 2003, SP3. Some testing I'm doing right now seems to point to the Application.FileSearch properties.

    -Adam

    EDIT:

    In fact, this simple subroutine produces no output:

    Please Login or Register  to view this content.
    Strange....
    Last edited by ahartman; 10-06-2009 at 02:01 PM.

  4. #4
    Registered User
    Join Date
    02-27-2008
    Location
    Irving, Texas
    MS-Off Ver
    MS Office 2016
    Posts
    96

    Re: FileSearch not returning results?

    I'm still stymied w/ this problem. It almost seems like I'll just have to reinstall excel, as that's the only thing that makes even a little bit of sense.

    -Adam

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: FileSearch not returning results?

    Quote Originally Posted by ahartman View Post
    Roy,

    I'm using 2003, SP3. Some testing I'm doing right now seems to point to the Application.FileSearch properties.

    -Adam

    EDIT:

    In fact, this simple subroutine produces no output:

    Please Login or Register  to view this content.
    Strange....
    This works fine for me, is the folder name correct?

  6. #6
    Registered User
    Join Date
    02-27-2008
    Location
    Irving, Texas
    MS-Off Ver
    MS Office 2016
    Posts
    96

    Re: FileSearch not returning results?

    Quote Originally Posted by royUK View Post
    This works fine for me, is the folder name correct?
    Yeah, the folder name is correct. I've either turned off some critical option, or have a corrupted install. I'm hoping it's an option, as it will take a lot of work to get the IT dept to reinstall my Excel.

  7. #7
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: FileSearch not returning results?

    Try this:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    02-27-2008
    Location
    Irving, Texas
    MS-Off Ver
    MS Office 2016
    Posts
    96

    Re: FileSearch not returning results?

    I'm at home right now. I'll try it on Monday Thanks for the suggestion, shg. What's your theory?

  9. #9
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: FileSearch not returning results?

    SearchFolders persists after a search. Just one more thing to try before calling IT.

+ 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