写文件的几种方法,你可比较一下: 1. Open CommonDialog1.FileName For Binary As #1 Put #1, , textName.Text Close #1 2. Open CommonDialog1.FileName For Output As #1 Print #1, textName.Text Close #1 3. Open CommonDialog1.FileName For Output As #1 Write #1, textName.Text Close #1
不会吧,你是用:print #1,"要写入的内容" 来写入吗?
1.
Open CommonDialog1.FileName For Binary As #1
Put #1, , textName.Text
Close #1
2.
Open CommonDialog1.FileName For Output As #1
Print #1, textName.Text
Close #1
3.
Open CommonDialog1.FileName For Output As #1
Write #1, textName.Text
Close #1
可用VBCRLF回车换行。