问题
I have a VBA script that appends text to any cell's comment, however it removes all comment formatting.
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.
回答1:
As documented, the Text method has three parameters.
Use all three to keep existing text:
c.Comment.Text "something to append ", 1, False
回答2:
Be very careful when using the Characters functions because there are ancient bugs in Excel and I have found that this can cause instability and unreproduceable crashes if used with large workbook.
来源:https://stackoverflow.com/questions/30696807/how-to-append-text-to-comment-in-excel-vba