Function IsFile(ByVal fName As String) As Boolean On Error Resume Next IsFile = ((GetAttr(fName) And vbDirectory) <> vbDirectory) End Function
=SE(isfile(A1)=VERO;"ok";"")
Sub FileExist() for r = 2 to 10 fname = "C:\percorso\" & Range("A" & r) & ".pdf" FileInQuestion = Dir(fname) If FileInQuestion <> "" Then Range("B" & r) = "OK" next End Sub
Function IsFile(ByVal fName As String) As Boolean On Error Resume Next IsFile = GetAttr(fName) End Function