VB讀取文字檔案的例子:逐行讀取

pick發表於2016-07-28
Private Sub Form_Load()
Dim data As String
Dim buffer As String
Open "d:\stud.txt" For InputAs #1
Do While Not EOF(1)
Line Input #1, buffer
data = data + buffer
Loop
Close #1
Text1.Text = buffer
End Sub

相關文章