VB问题..急求

来源:百度知道 编辑:UC知道 时间:2024/05/31 16:07:24
用input 语句..
如:
do while not eof(1)
input #1, a
text1.text=text1.text & a
loop
close #1
输出的text1.text可不可以一行行分出来..
可以的话说下编程

do while not eof(1)
input #1, a
text1.text=text1.text & a & vbCrLf
loop
close #1

改成这样

do while not eof(1)
input #1, a
text1=text1 & a & vbCrLf
loop
close #1

代码同上,但要注意必须先设置text1的MultiLine设置为True
另:在循环中不要使用text1.text,访问属性比访问变量要慢得多,可用变量代替,循环完了再赋给text1.text :)