Function Provjera_G() As Boolean Dim temp As String Dim fl Dim fs Dim I Dim Putanja As String Putanja = "C:\tmp\" 'Ovdje upisati putanju Set fs = Application.FileSearch With fs .LookIn = Putanja .FileType = 1 If .Execute > 0 Then For I = 1 To .FoundFiles.Count fl = .FoundFiles(I) Next I Else MsgBox "Tne postoji fajl" GoTo Kraj End If End With If Right(fl, 3) = "ERR" Then Close #1 Open fl For Input As 1 Input #1, temp Close #1 MsgBox temp Provjera_G = False Else MsgBox "Uspješno izvršavanje." Provjera_G = False End If Kraj: End Function