Application.Filesearch
FileSearch seems so flakey that it best avoided.
Use Dir or better GetAttr to determine if the file exists.
NickHK
"EA" ...
Can anyone please advise why the code below worked with Excel 2000 but not
with Excel 2003?
With Application.FileSearch
.Filename = "C:\Test.xls"
If .Execute 0 Then
Workbooks.Open Filename:="C:\Text.xls"
End If
End With
|