Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Application.FileSearch crashed Excel in Windows 2K

I use the following code to search for specific files:

MyFilePath = "C:\Documents and Settings\trinaj\My Documents\"
' This is for 'trinaj's computer

MarkSub "starting filesearch next:FindOldFiles"
With Application.FileSearch
.NewSearch
.FileName = "*.xls"
.LookIn = MyFilePath
.SearchSubFolders = True
.TextOrProperty = "BuildStreetsReports"
.MatchTextExactly = False
.Execute
MarkSub "filesearch complete:FindOldFiles"

===========================

This code runs fine on a Windows 98 system (though it is slow) and runs fine
on a Windows XP system (very quick).

I tried to read the path to the user's "My documents" folder, but settled
for hard coding in that for this user (trinaj). I had the user open a
worksheet that read that and recorded it and then had he send me the
worksheet. Then I had her browse to her My Docs folder and copy the path and
email it to me. I got the same path each time (C:\Documents and
Settings\trinaj\My Documents\), so I am fairly assured that this is correct.

MarkSub records the passed text in an extra worksheet and saves the
workbook, and when I look at that sheet, "starting filesearch
next:FindOldFiles" is the last entry, so I think I can be certain that the
"Application.FileSearch" is where things bomb.

Can anyone suggest a solution? Possibly an alternative to using
"Application.FileSearch". This needs to be generic enough that I don't have
to have each user do any unusual configuration to make it work. The
multitude of users have Windows 98, Windows 2K and Windows XP.

TIA,
Ken




Reply
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
Application.FileSearch Cleberton(Brazilian) Excel Discussion (Misc queries) 2 October 26th 09 01:21 PM
Application.FileSearch is not working?? alondon Excel Programming 5 January 18th 05 03:12 AM
Application.Filesearch yields incorrect results?? Ed[_23_] Excel Programming 2 August 24th 04 08:59 PM
FileSearch inconsistencies between Office/Windows version combinat Ali Campbell Excel Programming 5 July 8th 04 09:36 PM
VBA Application.FileSearch Roger Frye Excel Programming 0 March 5th 04 04:07 AM


All times are GMT +1. The time now is 10:27 AM.

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

About Us

"It's about Microsoft Excel"