Application.FileSearch 2007 Reference

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I have the following code that works fine with Acess 2002 SP2. I run the
same code useing Acess 2007 SP2 I get Run-time error 2455 "You entered an
expression that hase an invalid reference to the property FileSearch". Both
system set-ups have the same set of references.

With Application.FileSearch
.NewSearch
.LookIn = sPath
.FileName = sFile
If .Execute() > 0 Then
If MsgBox("Delete existing file " & sPath & sFile & "?",
vbYesNo, "Dupilcate File Name") = vbYes Then
Kill (sPath & sFile)
Else
MsgBox "Delete or rename file " & sPath & sFile & ".",
vbOKOnly, "Dupilcate File Name"
Exit Sub
End If
End If
End With
 
The Application.Filesearch functionality was apparently removed from the 2007
suite. If you google Application.Filesearch 2007 you should be able to find
a few alternatives.

hth

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Back
Top