Syntax

expression.AddComment(Text)

expression A variable that represents a Range object.

Parameters

Name Required/Optional Data Type Description
Text Optional Variant The comment text.

Return Value
Comment

Example

This example adds a comment to cell E5 on worksheet one.

Visual Basic for Applications
Worksheets(1).Range("E5").AddComment "Current Sales"
Add a comment to a specified range? add comment Add Comment Method addcomment AddComment Method Append a notation to a particular cell?

See also: