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 |