Private Sub Timer1_Timer()
Dim i As Integer, m As String
List2.Clear
List3.Clear
List5.Clear
Open "C:\Eagle\yunxinrizi.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, m
ListBox2.AddItem m
Loop
Close #1
Open "C:\Eagle\qqrizi.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, m
ListBox3.AddItem m
Loop
Close #1
Open "C:\Eagle\jiaqunrizi.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, m
ListBox5.AddItem m
Loop
Close #1
End Sub
Do While Not EOF(1) 这句 如果#1没到文件尾 二#2 已经读完了 这时在读#2 就会出错
这样先读完1 再读2 再读3
Do While Not EOF(1)
Line Input #1, m
ListBox2.AddItem m
Loop
Do While Not EOF(2)
Line Input #2, m
ListBox3.AddItem m
loop