VB读取文本文件的例子:逐行读取

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

你可能感兴趣的:(VB读取文本文件的例子:逐行读取)