AddComment Method

Microsoft Excel Visual Basic

Adds a comment to the range.

expression.AddComment(Text)

expression    Required. An expression that returns a Range object.

Text    Optional Variant. The comment text.

Example

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

Worksheets(1).Range("E5").AddComment "Current Sales"