如何在Excel VBA中附加文本以进行注释? [英] How to append text to comment in Excel VBA?

查看:78
本文介绍了如何在Excel VBA中附加文本以进行注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VBA脚本,可将文本附加到任何单元格的注释中,但是会删除所有注释格式.

I have a VBA script that appends text to any cell's comment, however it removes all comment formatting.

我当前的代码很简单

c.Comment.text "something to append" & " " & c.Comment.text

是否可以执行此操作,但又不丢失所有注释的格式.

Is it possible to do this job, but without losing all comment's formatting.

推荐答案

如所述,Text方法

As documented, the Text method has three parameters.
Use all three to keep existing text:

c.Comment.Text "something to append ", 1, False

这篇关于如何在Excel VBA中附加文本以进行注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆