I need to know if a file exists, using Visual Basic 6 (not VB.NET). So far, I have this, as gleaned from a few different snippets I googled up:
If Len(Dir("C:\frogs\dogs.txt")) > 0 Then
MsgBox "File Found!"
Else
MsgBox "File Does Not Exist!"
End If
That's it. The whole script. Doesn't work. When I run it, I get "Type Mismatch: 'Dir'" What am I doing wrong?
This answer appears to be for a later version of VB? Maybe it's relevant?
Thanks for any help.