Syntax

expression.Scenarios(Index)

expression A variable that represents a Worksheet object.

Parameters

Name Required/Optional Data Type Description
Index Optional Variant The name or number of the scenario. Use an array to specify more than one scenario.

Return Value
Object

Example

This example sets the comment for the first scenario on Sheet1.

Visual Basic for Applications
Worksheets("Sheet1").Scenarios(1).Comment = _ "Worst-case July 1993 sales"
Change the properties of a particular scenario? Loop through all scenarios on the worksheet? Return an object representing a single scenario? Scenarios Scenarios Method

See also: