line input# 从已打开的顺序文件中读出一行并将它分配给string变量。
语法:line input #filenumber,varname
filenumber 必要。任何有效的文件号
varname 必要。有效的variant(变体数据)值或string(
字符串)变量名
示例:
dim text
open"c:\windows\system.ini" for input as #1 '打开文件
do while not eof(1) '循环至文件尾
line input#1,text '读入一行数据并将其赋予某变量
debug.print text ’在立即窗口中显示数据
loop
close#1 '关闭文件