Function Broj_Racuna(Putanja_Filea as string) Dim temp As String Dim Poz As Integer Close #1 Open Putanja_Filea For Input As #1 While Not EOF(1) Input #1, temp Wend Poz = InStr(1, temp, "LastReceiptNumber;") If Poz > 0 Then Broj_Racuna = Mid(temp, Poz + 18) GoTo Kraj: End If Kraj: Close #1 End Function