Share via


Application.ViewEditSingle Method

Project Developer Reference

Creates, edits, or copies a single-pane view.

Syntax

expression.ViewEditSingle(Name, Create, NewName, Screen, ShowInMenu, HighlightFilter, Table, Filter, Group)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Name Optional String The name of a single-pane view to edit, create, or copy. The default is the name of the active view.
Create Optional Boolean True if Project should create a new single-pane view. If NewName is Empty, the new view is given the name specified with Name. Otherwise, the new view is a copy of the view specified with Name and is given the name specified with NewName. The default value is False.
NewName Optional String A new name for the view specified with Name (Create is False) or a name for the new view just created (Create is True). If NewName is Empty and Create is False, the view specified with Name retains its current name. The default value is False.
Screen Optional Long A constant specifying the view to display. The default value is pjGantt. Can be one of the PjViewScreen constants.
ShowInMenu Optional Boolean True if the view name appears on the View menu. The default value is False.
HighlightFilter Optional Boolean True if Project should highlight filtered items. The default value is False.
Table Optional String The name of a table to display in the view. Required for a new view.
Filter Optional String The name of a filter to apply to the view. Required for a new view.
Group Optional String The name of a group to apply to the view. If a group is required for the view, but none is specified, the default is No Group. This value is ignored if the view specified with the Screen argument does not use groups.

Return Value
Boolean

Example
The following example creates a new view for tasks currently in progress and grouped by duration.

Visual Basic for Applications
  Sub DisplayMyTasks()
    ViewEditSingle Name:="My Tasks", Create:=True, _
        Screen:=pjGantt, Table:="Schedule", _
        Filter:="In Progress Tasks", Group:="Duration"
End Sub

See Also