Add Comment Method

This method adds a Comment object (i.e., a comment) to the single-cell range. Its syntax is:


where Text is the text of the comment. For instance, the code:

Dim rng As Range Dim c As Comment Set rng = Range("B2")

Set c = rng.AddComment("This is a comment")

adds a comment to cell B2 with the text "This is a comment." Note that if RangeObject consists of more than a single cell, a runtime error results.

0 0

Post a comment