问题描述
我一直在整理一个Excel的COM加载项,使我可以利用工作簿中的信息直接从excel发送电子邮件.
我遇到了砖墙,因为我希望用户在应用程序中(某种程度上)编写代码.这将存储在一个单元格中,并在以后重新打开时进行检索.
我已经声明了字符串变量(var1,var2,var3),并为它们分配了正确的值.这是我要在电子邮件正文中编写的示例:
I''ve been putting together a COM add-in for excel that will allow me to send emails directly from excel utilizing information within the workbook.
I have run into a brick wall because I want the user to (sort of) write code within the app. This will be stored within a cell and retrieved when reopened at a later date.
I have declared string variables (var1,var2,var3) and have assigned these the correct values. Here is an example of what I want to write this within the email message body:
"Hello " & var1 & "," & vbNewLine _
& "Today sales were: " & var2 & " " & var3 & "."
现在的问题是,该字符串已分配给变量,并且即使使用正确的和&用法",程序也无法确认var1,var2,var3或VbNewLine.
对如何完成此任务有任何想法吗?并在COM插件中保持我想要的灵活性?
谢谢
Michael
Now the problem is that this string is assigned to a variable, and the program is not acknowledging the var1,var2,var3 or VbNewLine even with proper " and & usage.
Any thoughts on how I could accomplish this task? And maintain the flexibility I want within the COM addin?
Thank you,
Michael
推荐答案
这篇关于变量的WITHIN字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!