vb怎么生成user.txt文件

来源:百度知道 编辑:UC知道 时间:2024/06/01 13:48:43
vb怎么生成user.txt文件。我要利用它在mastercam里面生成一个NC代码,,怎么做啊。。。

用法:
WriteFile 文件名,"文件内容"

'***************************************************************
'将字符串写入文件函数
Private Sub WriteFile(filePath As String, strTmp As String)
Open filePath For Output As #1
Print #1, strTmp
Close #1
End Sub
'***************************************************************

open app.path & "user.txt" for output as #1
print #1,"引号里边的就是文件的内容"
close #1

Open FilePath_Name For output as #1
Print #1,要写入的内容
Close #1