FileExistN



Public Function FileExists(sFilename As String) As Boolean
Const ErrDiskNotReady = 71

On Error GoTo ErrExit

FileExists = CBool(Len(Dir(sFilename)) <> 0)
Exit Function

ErrExit:
FileExists = False
If (Err.Number = ErrDiskNotReady) Then
If MsgBox("Bitte Diskette einlegen!", _
vbExclamation + vbOKCancel) = vbOK Then
Resume
Else
Exit Function
End If
Else
ShowError
End If
Exit Function
End Function

(fileexistn.html)- by Paolo Puglisi - Modifica del 25/3/2019