问题1:
open app.path & "\abc.txt" for output as #1
print #1,"abc"
close #1
问题2:
dim a as double
a=0
open app.path & "\abc.txt" for output as #1
print #1,a
close #1
问题3:
dim a as double
a=0
open app.path & "\abc.txt" for output as #1
print #1,"abc"
print #1,a
close #1
如果你会fso的话,那很简单。
利用fso.opentextfile()写文件
set fso=new fielsystemobject
set fi=fso.opentextfile("abc.txt",forwriting,true)
写字符串就用fi.write("abc")
写变量就用fi.write(A)
两个一起写就是fi.write("abc" & vbcrlf & A)
vbcrlf是换行用的
否则,直接用文件读写