by VisualBlind (12 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(11 Votes)
This will check if a dam*n file exists the easy and "right" way! Plz vote for this code if you like it!
Dim fso
Dim strFile As String
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists("c:\windows\Calc.exe") Then
MsgBox "It does exist", vbInformation, "Does Exist"
Else
MsgBox "It does not exist!", vbExclamation, "Doesn't Exist"
End If