Scenario Interface
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a scenario on a worksheet. A scenario is a group of input values (called changing cells
) that’s named and saved.
public interface class Scenario
[System.Runtime.InteropServices.Guid("00020897-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Scenario
Public Interface Scenario
- Attributes
The Scenario object is a member of the Scenarios collection. The Scenarios collection contains all the defined scenarios for a worksheet.
Use Scenarios(index
), where index
is the scenario name or index number, to return a single Scenario object.
Application |
Returns an Application object that represents the Microsoft Excel application. |
Changing |
Returns a Range object that represents the changing cells for a scenario. |
Comment |
Returns or sets the comment associated with the scenario. The comment text cannot exceed 255 characters. |
Creator |
Returns a 32-bit integer that indicates the application in which this object was created. |
Hidden |
True if the scenario is hidden. The default value is False. |
Index |
Returns the index number of the object within the collection of similar objects. |
Locked |
True if the object is locked; False if the object can be modified when the sheet is protected. |
Name |
Returns or sets the name of the object. |
Parent |
Returns the parent object for the specified object. |
Values[Object] |
Returns an array that contains the current values of the changing cells for the scenario. |
Change |
Changes the scenario to have a new set of changing cells and (optionally) scenario values. |
Delete() |
Deletes the object. |
Show() |
Shows the scenario by inserting its values on the worksheet. The affected cells are the changing cells of the scenario. |