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

Application.BoxSet Method (Project)

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

Creates, selects, or moves a task in the Network Diagram view.

Syntax

expression. BoxSet( ** action, ** TaskID, ** XPosition, ** YPosition, ** ProjectName** )

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
actionOptionalLongThe operation to perform on the specified task(s). The default value is pjBoxSelect. Can be one of the PjBoxSet constants.
TaskIDOptionalLongThe identification number of the task. If action is pjBoxCreate, TaskID is ignored.
XPositionOptionalLongThe horizontal position of the task, in pixels. Required if action is pjBoxMoveAbsolute or pjBoxMoveRelative. If action is pjBoxCreate or pjBoxMoveAbsolute, XPosition is the absolute horizontal position of the upper-left corner of the task. If action is pjBoxMoveRelative, XPosition is the amount to move the task horizontally relative to the current position. If action is pjBoxAddToSelection, pjBoxSelect, or pjBoxUnselect, XPosition is ignored
YPositionOptionalLongThe vertical position of the task, in pixels. Required if action is pjBoxMoveAbsolute or pjBoxMoveRelative. If action is pjBoxCreate or pjBoxMoveAbsolute, YPosition is the absolute vertical position of the upper-left corner of the task. If action is pjBoxMoveRelative, YPosition is the amount to move the task vertically relative to the current position. If action is pjBoxAddToSelection, pjBoxSelect, or pjBoxUnselect, YPosition is ignored.
ProjectNameOptionalStringIf the active project is a consolidated project, specifies the name of the project for the identification number specified by TaskID. If TaskID is not specified, ProjectName is ignored. The default value is the name of the active project.

Return Value

Boolean

Remarks

If only one task box is selected, specifying pjBoxUnselect has no effect.

If automatic layout has been activated for the Network Diagram view, XPosition and YPosition have no effect.

Example

The following example adds the task with TaskID 2 to the selected tasks.

Sub Box_Set() 

 'Activate the Network Diagram view 
 ViewApply Name:="Network Diagram" 
 BoxSet action:=pjBoxAddToSelection, TaskID:="2" 
End Sub
© 2018 Microsoft