LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Searching for files that contain ???

I use the following to search for files that are ".xls" files and contain a
sub name in the VBA:

MyFilePath is the path to the My Documents folder on whatever system this
runs on

StartTime = Time
With Application.FileSearch
.NewSearch
.FileName = "*.xls"
.LookIn = MyFilePath
.SearchSubFolders = True
.TextOrProperty = "BuildStreetsReports"
.MatchTextExactly = True
.Execute
EndTime = Time
MsgBox ("Done searching. It took " & (EndTime - StartTime) * 24 * 60
& " minutes")

The problem is it can take about 45 minutes to run on my Windows 98 system
and I was just wondering if there is a faster way to do this or a way to
speed up this search. I have no control over where the the user saves the
files I need to find, except that they are supposed to be in the My
Documents folder. If they aren't I am not as concerned about them. I can
handle that manually on a user by user basis. I surely do not want to slow
things down any further by searching the entire hard drive, unless, of
course, that would actually make this search go faster.

Just a note that the time it takes this search to complete is never very
consistent. Sometimes it takes 20 minutes and others it take 45 when run on
the same system with no changes to the files or file structure.

Thanks for any ideas.

Ken



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching Files Gator Excel Discussion (Misc queries) 0 August 11th 08 03:04 PM
Searching large excel files mthakershi Excel Discussion (Misc queries) 1 June 13th 07 06:31 PM
Searching for mutiple items in txt files Michael Wise[_2_] Excel Programming 3 August 18th 04 01:04 AM
Searching For Files with Dates sa26 Excel Programming 2 May 25th 04 04:30 PM
searching different files macro fullymooned[_4_] Excel Programming 1 May 19th 04 05:36 PM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"