Private Sub Command1_Click()
If FileExistsDIR("C:\Test.xls") Then Kill "C:\Test.xls"
End Sub
' Method 1
Function FileExistsDIR(sFile As String) As Boolean
FileExistsDIR = True
If Dir$(sFile) = vbNullString Then FileExistsDIR = False
End Function
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.