ViewApply Method

Sets the view in the active window.

Syntax

expression**.ViewApply(Name, SinglePane, Toggle)**

*expression   *     Optional. An expression that returns an Application object.

Name    Required String. The name of the view to display in the active window.

SinglePane    Optional Boolean. True if any existing split is removed and the active window displays a single-pane view. The default value is False.

Toggle    Optional Boolean. True if the active window switches from one pane to two panes, or from two panes to one pane. Toggle is ignored if SinglePane is True. The default value is False.

Example

The following example sets the active window to a single-pane view of the Resource Sheet. It assumes that the active view is a combination of the Gantt Chart and the Task Form.

Sub ChangeWindowToResourceSheet()
    ViewApply Name:="Resource Sheet", SinglePane:=True
End Sub

Applies to | Application Object

See Also | FormViewShow Method | ResourceViewList Property | TaskViewList Property | ViewEditCombination Method | ViewEditSingle Method | ViewList Property | Views Method | WindowSplit Method