Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.ViewApply Method (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Applies a view to the active window.

Syntax

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

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
NameOptionalStringThe name of the view to display in the active window.
SinglePaneOptionalBooleanTrue if an existing split is removed and the active window displays a single-pane view. The default value is False.
ToggleOptionalBooleanTrue 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

Boolean

Remarks

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.

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

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