A
Arturo
Can someone help me with this? I copied the code from the forum last week and
added the hyperlink and DoCmd.Quit commands. I was deleting .mdb files.
Sometimes there was one and sometimes there were many, and it always worked
great. I have since converted the files to .mde files. Now it only deletes
one .mde file. I can rerun it and it won’t delete any more files in that
directory.
Private Sub Form_Open(Cancel As Integer)
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FileExists("C:\ab c\new\*.mde") Then
Kill "C:\ab c\new\*.mde"
Else
End If
Application.FollowHyperlink "C:\ab c\MyProgram.mde"
DoCmd.Quit
End Sub
Thanks.
added the hyperlink and DoCmd.Quit commands. I was deleting .mdb files.
Sometimes there was one and sometimes there were many, and it always worked
great. I have since converted the files to .mde files. Now it only deletes
one .mde file. I can rerun it and it won’t delete any more files in that
directory.
Private Sub Form_Open(Cancel As Integer)
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FileExists("C:\ab c\new\*.mde") Then
Kill "C:\ab c\new\*.mde"
Else
End If
Application.FollowHyperlink "C:\ab c\MyProgram.mde"
DoCmd.Quit
End Sub
Thanks.