Application.ViewEditSingle method (Project)
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 creates a single-pane view. If NewName is an empty string (""), 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 an empty string 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. Can be one of the PjViewScreen constants. The default value is pjGantt |
ShowInMenu | Optional | Boolean | True if the view name appears on the Other Views drop-down 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 value is "No Group". The Group 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.
Sub DisplayMyTasks()
ViewEditSingle Name:="My Tasks", Create:=True, _
Screen:=pjGantt, Table:="Schedule", _
Filter:="In Progress Tasks", Group:="Duration"
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.