vba:在文件中打印反转的逗号字符串

时间:2017-05-12 09:48:03

标签: vba

我必须在txt文件中写一个字符串:

Option Explicit
Dim path As String
Dim filename1 As String

path = Application.ActiveWorkbook.Path
filename1 = "OutputHtml.txt"
Open path & "\" & filename1 For Output As #1
Print #1, "<table class="msg">"

但是Print #1, "<table class="msg">"会在Print #1, "<table class="; msg; ">"中自动编译,它会显示: msg变量未定义

如何将正确的字符串打印到filename1?提前致谢

0 个答案:

没有答案