Function ImeF() Dim Putanja As String Dim Faj As String Dim Ext As String Dim ImeFajla As String Dim I As Integer Ext = "txt" Fajl = "moj" Putanja = "C:\Temp\" ImeFajla = Putanja & Fajl & "." & Ext START: If Dir(ImeFajla) = "" Then ImeF = ImeFajla Else ImeFajla = Putanja & Fajl & "(" & I & ")." & Ext I = I + 1 GoTo START End If MsgBox ImeF End Function