Function ProvjeraF() As Boolean Dim Temp As String Dim Red As Integer Dim Greska As String Dim GreskaOpis As String Dim Poz(1 To 2) As Integer Dim I As Integer Close #1 Red = 2 ' red iz kojeg cita Open Putanja_Filea For Input As 1 For I = 1 To Red Input #1, Temp Next I Poz(1) = InStr(1, Temp, "ErrorCode=") + 11 Poz(2) = InStr(1, Temp, "ErrorOPOS=") - 2 Greska = Mid(Temp, Poz(1), Poz(2) - Poz(1)) If Greska = "0" Then MsgBox "Uspješno izvršavanje." ProvjeraF = True Else Poz(1) = InStr(1, Temp, "ErrorDescription=") + 17 Poz(2) = InStr(1, Temp, "/>") - 2 GreskaOpis = Mid(Temp, Poz(1), Poz(2) - Poz(1)) MsgBox "Greška br: " & Greska & vbCr & GreskaOpis ProvjeraF = False End If Close #1 Kraj: Exit Function End Function