Adds a comment to the range.
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 D4 on worksheet one.
Worksheets(1).Range("D4").AddComment "Current Sales"