[英]How to append text to comment in Excel VBA?
I have a VBA script that appends text to any cell's comment, however it removes all comment formatting. 我有一个VBA脚本,可将文本附加到任何单元格的注释中,但是会删除所有注释格式。
My current code is as simple as 我当前的代码很简单
c.Comment.text "something to append" & " " & c.Comment.text
Is it possible to do this job, but without losing all comment's formatting. 是否可以执行此工作,但又不丢失所有注释的格式。
As documented, the Text
method has three parameters . 如文档所述,
Text
方法具有三个参数 。
Use all three to keep existing text: 使用所有三个保留现有文本:
c.Comment.Text "something to append ", 1, False
使用Characters函数时要非常小心,因为Excel中存在一些古老的错误,而且我发现如果与大型工作簿一起使用,这可能会导致不稳定和无法复制的崩溃。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.