File-search results in worksheet

H

hmm

I need a formula for Excel whose input is a string, and whose output is a
list of path\filename found for filenames containing the string.
 
H

hmm

Thanks GS.

I tried your macro. It showed "There were no files found," even with
strings for which I am sure a file exists (it would work from Windows
search). In debug, the program skipped the "Then" and went to the "Else"; as
if .Execute() was always zero. Watch values of s and s2 were as expected.

Perhaps there is an error somewhere?
 
G

Gary''s Student

the routine looks only on the C drive. I tried putting
arte
in A1 and got stuff like:

C:\Documents and Settings\All Users\Application Data\Webroot\Spy
Sweeper\SpySweeperGettingStarted.chm
C:\Documents and Settings\All Users\Desktop\Adobe Photoshop Album Starter
Edition 3.0.lnk
C:\Documents and Settings\All Users\Start Menu\Programs\Adobe\Adobe
Photoshop Album Starter Edition 3.0.lnk
C:\Documents and Settings\All Users\Start
Menu\Programs\Creative\Documentation\Getting Started Manual.lnk
C:\Documents and Settings\All Users\Start Menu\Programs\EPSON\Film
Factory\EPSON PhotoStarter3.0.lnk
C:\Documents and Settings\All Users\Start Menu\Programs\EPSON\Film
Factory\Getting Started Guide.lnk
C:\Documents and Settings\All Users\Start
Menu\Programs\Games\GameChannel\Blackhawk Striker\Help.lnk
 
H

hmm

Thanks Gary; it works. The trick is that it will only search folders that
are offspring of the Excel file's folder.

Can it be implemented in the form of a function, so that I can insert it in
a table?
 
G

Gary''s Student

Check back tomorow
--
Gary''s Student


hmm said:
Thanks Gary; it works. The trick is that it will only search folders that
are offspring of the Excel file's folder.

Can it be implemented in the form of a function, so that I can insert it in
a table?
 
Top