VB文件读写流

Sub write1()
Dim Sql As String
Sql = "520 by lfq"
 Set FSO = CreateObject("Scripting.FileSystemObject")  --调用文件对象
Set SqlFileAll = FSO.createtextfile("d:\lfq.SQL", True)--生成文件地址
SqlFileAll.writeLine (Sql)--文件内容写入
MsgBox ("恭喜生成520的祝福语")--成功提示语

End Sub

以上就是vb生成文件的写法

猜你喜欢

转载自blog.csdn.net/wtfsb/article/details/130120319