Thread
:
FileSearch Problem
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
FileSearch Problem
try commenting out
.FileType = msoFileTypeExcelWorkbooks
and/or put " " around sumbookname
.FileName = SumBookName
--
Don Guillett
SalesAid Software
Granite Shoals, TX
"Bin" wrote in message
...
I am using a macro with FileSearch in both office and
home computers. It works perfect in my office, but not
work at home. The problem is in FileSearch. The code is
as follow:
With Application.FileSearch
.NewSearch
.LookIn = FilePath
.FileName = SumBookName
.FileType = msoFileTypeExcelWorkbooks
.MatchTextExactly = True
If .Execute() 0 Then
For i = 1 To .FoundFiles.Count
If .FoundFiles(i) = FilePath +
SumBookName Then
FileExist = True
Exit For
End If
Next i
Else
FileExist = False
End If
End With
By using debug.print, I found Execue() is 0.
I am using same Excel 2002 at my office and home but at
differnt OS. Office is Windows2K, home is WinXP. What is
the problem? Anybody can help me?
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]