Remarks

The Comment object is a member of the collection.

Example

Use the property to return a Comment object. The following example changes the text in the comment in cell E5.

Visual Basic for Applications
Worksheets(1).Range("E5").Comment.Text "reviewed on " & Date

Use Comments(), where is the comment number, to return a single comment from the Commentscollection. The following example hides comment two on worksheet one.

Visual Basic for Applications
Worksheets(1).Comments(2).Visible = False

Use the method to add a comment to a range. The following example adds a comment to cell E5 on worksheet one.

Visual Basic for Applications
With Worksheets(1).Range("e5").AddComment .Visible = False .Text "reviewed on " & Date End With
comment comment object Help topic on comment object?

See also:

index index