EXCEL VBA中,没有WriteLine语句,没办法输出字符串。在excel VBA中,写文件使用write,先要打开一个输入文件,代码:Open "c:\w.txt" For Output As 1#Write #1, "test"
在String里面的 一个双引号 应该写为“""”。这句话写成下面这样就可以了a.WriteLine ("")
a.WriteLine ("")双引号内两个双引号转义为一个双引号
a.WriteLine ("")