Comment Property

Microsoft Excel Visual Basic

Returns a Comment object that represents the comment associated with the cell in the upper-left corner of the range. Read-only Comment object.

expression.Comment

expression    Required. An expression that returns a Range object.

ShowComment property as it applies to the Scenario object.

Returns or sets the comment associated with the scenario. The comment text cannot exceed 255 characters. Read/write String.

expression.Comment

expression    Required. An expression that returns a Scenario object.

Example

This example sets the comment for scenario one on Sheet1.

Worksheets("Sheet1").Scenarios(1).Comment = _
    "Worst case July 1993 sales"