First turn strict on. Learn data types. Learn about code reuse. Take this
Functions should have an As clause. Why are you returning 0 or 1? Where is the functions modifier? What about exception handling?
You are using loads of VB6 left overs also.
Code
Function DeleteFile(ByVal file As String)
If (System.IO.File.Exists(file)) Then
System.IO.File.Delete(file)
Else
Return 0
Exit Function
End If
Return 1
End FunctionFunctions should have an As clause. Why are you returning 0 or 1? Where is the functions modifier? What about exception handling?
You are using loads of VB6 left overs also.

![[Image: 3269089713e50d48e50e4d5bb760fb95.png]](https://gyazo.com/3269089713e50d48e50e4d5bb760fb95.png)