I'm looking for the preferred method of determining if a file (data base) exists before running an app. I have seen different methods, such as dir, opening a file, and I suspect there are API's that will accomplish this also.
' Verify replacement of output file if it exists
If Dir(OutFileName) <> "" Then
Msg = "Replace contents of " + OutFileName + "?"
If MsgBox(Msg, 4, "Replace File?" = 6 Then
Kill OutFileName
Else
txtOutputFile.SetFocus
txtOutputFile.SelStart = 0
txtOutputFile.SelLength = Len(txtOutputFile)
Exit Sub
End If
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.