VB读取命令
我想读入每一句话,具体像下面,但是总是提醒文件找不到,我应该怎样改?求指点
[解决办法]
那就试试使用ms script control,语言设置为java
[解决办法]
Private Sub Command1_Click()
'假设上面的内容为文件A.Log
'读取有多少行数
Dim a As String
Dim n As Integer
Open App.Path & "\A.Log" For Binary As #1
n = 0
While Not EOF(1)
Line Input #1, a
n = n + 1
Wend
'读入A.Log
Do While Not EOF(1)
Line Input #1, a
'这里该做啥做啥
DoEvents
Loop
Close #1
MsgBox n
End Sub