✔ 最佳答案
參考以下範例,
Dim oFile as System.IO.File
Dim oRead as System.IO.StreamRead er
dim intLine as integer
oRead = oFile.OpenText(“C:\sample.txt”)
intLine = 0
While oRead.Peek <> -1
LineIn = oRead.ReadLine()
if intLine=17 then
txtdata.text = linein
end if
intLine += 1
End While
oRead.Close()
msgbox intLine