Scenarios Method
Applies To
Worksheet object.
Description
Returns an object that represents either a single scenario (a Scenario object, Syntax 1) or a collection of scenarios (a Scenarios object, Syntax 2) on the worksheet.
Syntax 1
expression.Scenarios(Index)
Syntax 2
expression.Scenarios
expression Required. An expression that returns a Worksheet object.
Index Optional Variant. The name or number of the scenario. Use an array to specify more than one scenario.
Example
This example sets the comment for the first scenario on Sheet1.
Worksheets("Sheet1").Scenarios(1).Comment = _
"Worst-case July 1993 sales"