Application.ViewApply Method (Project)

Applies a view to the active window.


expression. ViewApply( _Name_, _SinglePane_, _Toggle_ )

expression A variable that represents an Application object.


Name Required/Optional Data Type Description
Name Optional String The name of the view to display in the active window.
SinglePane Optional Boolean True if an 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.

Return Value



To apply a view where the change can be one of the built-in views and can be applied to a specified pane in a split view, use the ViewApplyEx method.


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 details view.

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