VB怎么输出文本或应用文件

来源:百度知道 编辑:UC知道 时间:2024/05/25 08:05:07
就是把text1.text的内容以一个文本或应用程序的格式输出到指定位置

保存text1中的内容到文本文件吗? 很容易的..

Open "c:\1.txt" For Output As #1
Print #1, Text1
Close #1

这样就行了,把Text1中的内容放到c盘的1.txt文件里面了.

楼上的,在打开文件后,好象还要加上循环控制吧,一般用while/wend语句.
while not Eof(1)……
wend……
既是:

Open "c:\1.txt" For Output As #1
while not Eof(1)
Print #1, Text1
wend
Close #1