Dim a As String
Dim n As Integer
Open "c:\1.txtt" For Input As #1
n = 0
While Not EOF(1)
Line Input #1, a
n = n + 1
Wend
Close
MsgBox "文件有 " & n & " 条记录。", vbInformation + vbOKOnly
这段代码是我在网上找的,实现功能是获取txt的行数,但是我不明白这段代码什么意思,可以详细解释一下这段代码工作原理以及每一行什么意思么?