VB 如何实现定时读取3个指定的记事本数据到指定列表框
我是这样写的报错,哪位大虾给我纠正下PrivateSubTimer2_Timer()DimiAsInteger,mAsStringOpen"C:\Eagle\yunxin...
我是这样写的 报错,哪位大虾给我纠正下
Private Sub Timer2_Timer()
Dim i As Integer, m As String
Open "C:\Eagle\yunxinrizi.txt" For Input As #1
Open "C:\Eagle\qqrizi.txt" For Input As #2
Open "C:\Eagle\jiaqunrizi.txt" For Input As #3
Do While Not EOF(1)
Line Input #1, m
Line Input #2, m
Line Input #3, m
ListBox2.AddItem m
ListBox3.AddItem m
ListBox5.AddItem m
Loop
Close #1
Close #2
Close #3
End Sub 展开
Private Sub Timer2_Timer()
Dim i As Integer, m As String
Open "C:\Eagle\yunxinrizi.txt" For Input As #1
Open "C:\Eagle\qqrizi.txt" For Input As #2
Open "C:\Eagle\jiaqunrizi.txt" For Input As #3
Do While Not EOF(1)
Line Input #1, m
Line Input #2, m
Line Input #3, m
ListBox2.AddItem m
ListBox3.AddItem m
ListBox5.AddItem m
Loop
Close #1
Close #2
Close #3
End Sub 展开
2个回答
展开全部
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
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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询