I'm trying to use MSAccess 2007 vba to find and delete a file if it exists, but when I tried to run it I get
"Run-time error '2455'; You entered an expression that has an invalid reference to the property FileSearch". I did some reading in some of the articles here and there was some mention that the Filesearch reference may no longer be available in access 2007. How else can I write this? Below is
the current code I scavenged together -
Set WB = Application.FileSearch
Lookin = "C:\Directory"
.FileName = "File.xls"
If .Filename > 0 Then
I may also need a 'Else If' somewhere before the script end to tell the vba code to skip this step if the file
is not found otherwise I may get a 'File not Found" error.