اخى استبدلت الدالة ب
Public Function IsFileExists(ByVal TxtPath As Variant) As Boolean
On Error GoTo ErrHandler
Dim sPath As String
sPath = Trim$(Nz(TxtPath, ""))
'إزالة علامات الاقتباس
sPath = Replace(sPath, """", "")
If Len(sPath) = 0 Then
IsFileExists = False
Exit Function
End If
If Dir(sPath, vbDirectory) <> "" Then
IsFileExists = True
Else
IsFileExists = False
End If
Exit Function
ErrHandler:
Debug.Print "IsFileExists Error"
Debug.Print "Path = [" & sPath & "]"
Debug.Print Err.Number & " - " & Err.Description
IsFileExists = False
End Function وعملت تمام ممكن شرح ما هى النماذج والدوال المطلوب للنثل للبرنامج بتاعى للعمل