Notice: Undefined offset: 2 in /home2/icentarb/public_html/icentar/classes/class.permissions.php on line 735
Type osoba
maticniBr As String * 13
ime As String * 25
prezime As String * 25
datumR As String * 10
adresa As String * 25
telefon As String * 9
End Type
Function saveBinFile()
Dim O As osoba
Dim maticni As Long 'vrijednost kucice
Dim strSize As Long
Open "c:\popis.bin" For Random As #1 Len = Len(O)
For f = 1 To 50
Worksheets("list1").Select
maticni = Cells(f + 1, 1)
O.maticniBr = maticni
O.ime = Cells(f + 1, 2)
O.prezime = Cells(f + 1, 3)
O.datumR = Cells(f + 1, 4)
Worksheets("list2").Select
O.adresa = Application.WorksheetFunction.VLookup(maticni, Range("A2:e51"), 4, False)
O.telefon = Str(Application.WorksheetFunction.VLookup(maticni, Range("A2:e51"), 5, False))
Put 1, f, O
Next f 'sljedeci red
Close 1 'zatvorimo datoteku
End Function
Function UcitajRed(KojiRed As Integer)
Dim RedP As osoba 'red podataka za ososubu
Dim temp
Open "c:\popis.bin" For Random As #1 Len = Len(RedP)
Get #1, KojiRed, RedP
temp = Trim(RedP.ime) & " " & Trim(RedP.prezime) & vbCr & "Rodjen: " & RedP.datumR _