Načítám to standartně:
Sub nacti()
Dim txt As String,p1 as integer, t1 as string
FileOpen(1, "c:\sklad.txt", OpenMode.Input)
While Not EOF(1)
txt = LineInput(1)
p1 = InStr(txt, " ")
material(i) = Microsoft.VisualBasic.Left(txt, p1 - 1)
t1 = Mid(txt, p1)
t1 = mez(t1)
drm(i) = Microsoft.VisualBasic.Left(t1, InStr(t1, " ") - 1)
i = i + 1
End While
FileClose(1)
|