Option Explicit Type data ime as String prezime as String jmbg as String end Type Public podaci as data sub snimiFile() Dim FF As Integer Dim imeFile As String FF = FreeFile() imeFile = folderPath & "/" & "datoteka.txt" podaci.ime=Sheets(List1).Cellls(2,2).Value podaci.ime=Sheets(List2).Cells(2,2).Value podaci.jmbg=Sheets(List3).Cells(2,2).Value Open imeFile For Output As #FF Write #FF, podaci.ime, podaci.prezime,podaci.jmbg Close #FF end sub