你可以先读出文件的行数。
dim lines() as string
dim i as integer
open C:\a.txt For Input As #1
lines()=split(input(lof(1),1),vbcrlf) '一个回车符为一行
Close 1
for i = ubound(lines) to 1 step -1
debug.print lines(i) '处理每一行
next i
dim lines() as string
dim i as integer
open C:\a.txt For Input As #1
lines()=split(input(lof(1),1),vbcrlf) '一个回车符为一行
Close 1
for i = ubound(lines) to 1 step -1
debug.print lines(i) '处理每一行
next i
Name;DeDepartment;Salary
John Smith;Marketing;80000
Mike;Producting;5800
....你可以先读出文件的行数。
dim lines() as string
dim i as integer
open "C:\a.txt" For Input As #1
lines()=split(input(lof(1),1),vbcrlf) '一个回车符为一行
Close 1
for i = ubound(lines) to 0 step -1
text1.text= text1.text & vbcrlf & lines(i) '处理每一行
next i则text1 显示
....
Mike;Producting;5800
John Smith;Marketing;80000
Name;DeDepartment;Salary是不是要这样