Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Comment Object

Office 2007
Represents a cell comment.

Remarks

The Comment object is a member of the Comments collection.

Example

Use the Comment 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(

index), where index is the comment number, to return a single comment from the Comments collection. The following example hides comment two on worksheet one.
Visual Basic for Applications
Worksheets(1).Comments(2).Visible = False

Use the AddComment 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



Community Additions

ADD
Show:
© 2015 Microsoft