问题:听说用EOF。但不知道具体怎么用。请给出具体用法。
Private Sub Command2_Click() Dim fn As Integer '文件号 Dim strRead As String '读取的内容 '获取文件号 fn = FreeFile() '以读方式打开文件 Open "f:\test.txt" For Input As #fn Do While Not EOF(fn) Line Input #fn, strRead '读取一行 Debug.Print strRead Loop Close #fn '关闭打开的文件 End Sub 如果你对听说用EOF。但不知道具体怎么用。请给出具体用法。这个问题有好的意见或
建议,请留言
|