LookUpTableAdd Method

Appends items to the lookup table of a custom outline code definition.

Syntax

expression**.LookUpTableAdd(FieldID, Level, Code, Description)**

*expression   *     Optional. An expression that returns an Application object.

PjCustomField

pjCustomProjectEntCost1-10 pjCustomResourceOutlineCode1-10
pjCustomProjectEntDate1-30 pjCustomResourceStart1-10
pjCustomProjectEntDuration1-10 pjCustomResourceText1-30
pjCustomProjectEntFlag1-20 pjCustomTaskCost1-10
pjCustomProjectEntNumber1-40 pjCustomTaskDate1-10
pjCustomProjectEntOutlineCode1-30 pjCustomTaskDuration1-10
pjCustomProjectEnt1-40 pjCustomTaskEntCost1-10
pjCustomResourceCost1-10 pjCustomTaskEntDate1-30
pjCustomResourceDate1-10 pjCustomTaskEntDuration1-10
pjCustomResourceDuration1-10 pjCustomTaskEntFlag1-20
pjCustomResourceEntCost1-10 pjCustomTaskEntNumber1-40
pjCustomResourceEntDate1-30 pjCustomTaskEntOutlineCode1-30
pjCustomResourceEntDuration1-10 pjCustomTaskEntText1-40
pjCustomResourceEntFlag1-20 pjCustomTaskFinish1-10
pjCustomResourceEntNumber1-40 pjCustomTaskFlag1-20
pjCustomResourceEntOutlineCode1-30 pjCustomTaskNumber1-20
pjCustomResourceEntText1-40 pjCustomTaskOutlineCode1-10
pjCustomResourceFinish1-10 pjCustomTaskStart1-10
pjCustomResourceFlag1-20 pjCustomTaskText1-30
pjCustomResourceNumber1-20  

Level    Optional Long. Specifies the level of the new code. The default value is the level of the last item in the lookup table.

Code    Optional String. The code to be added to the lookup table.

Description    Optional String. A description for the field specified in Code.

Remarks

If only the FieldID argument is specified, the LookUpTableAdd method brings up the Lookup Table dialog box for the specified custom outline code.

Example

This example illustrates how it is possible to create an invalid entry in a lookup table. The first line correctly adds a new code to the second level of a two-level code mask. The second line, however, causes a problem in the lookup table because the appended code doesn't match the mask for the code; i.e., it adds the new code at the third level of a two-level mask.

Sub LookupTableProblem()
    Application.LookUpTableAdd pjCustomTaskOutlineCode1, Level:=2, Code:="Q"
    Application.LookUpTableAdd pjCustomTaskOutlineCode1, Level:=3, Code:="Z"
End Sub

Applies to | Application Object

See Also | CustomOutlineCodeEdit Method