【发布时间】:2009-12-15 15:45:58
【问题描述】:
我是 VBA 和 html 的新手,我很困惑。
我正在尝试将字符串变量设置为等于几个串联的 html 字符串和控制值。我不知道我做错了什么。
这是我的代码:
htmlText = "<HTML><BODY bgcolor=#0b3767> <img height=""71"" width=""500"" alt=""Central Analysis Bureau, Inc. - Know Your Insureds"" src=""http://cabfinancial.com/images/logoEmail.png"">"_
& "<a href=" & txtLink.Value & ">Volume " & txtVolume.Value & " Edition " & txtEdition.Value _
& "</a>" _
& txtHtml.Value & "<a href=""txtLink.Value"">Click here to read the complete article</a>" _
& "</BODY></HTML>"
htmlText 是一个字符串。 txtLink、txtVolume、txtEdition、txtHtml 都是表单上的文本框控件。
【问题讨论】:
-
你想达到什么目的?什么让你感到困惑?
-
那么您到底遇到了什么问题?我在您的代码中看到的唯一明显问题是第一行末尾的下划线之前没有空格。
标签: html string vba concatenation quotes