VBA CODE - in work
Funktion File_Exists
Public Function File_Exists(str__Path_and_Filename As String, Optional ByRef bool__Error) As Boolean
Dim obj__FSO As Object
On Error GoTo MyError
Set obj__FSO = CreateObject("Scripting.FileSystemObject")
File_Exists = obj__FSO.FileExists(str__Path_and_Filename)
MyExit:
Set obj__FSO = Nothing
Exit Function
MyError:
If IsMissing(bool__Error) Then
MsgBox "Error: FKT File_Exists - " & Err.Description & " - " & Err.Number & " - " & Err.Source
Else
bool__Error = True
End If
GoTo MyExit
End Function