Application.LookUpTableAddEx method (Project)

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

Syntax

expression. LookUpTableAddEx( _FieldID_, _Level_, _Code_, _Description_, _Phonetic_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
FieldID Required Long Specifies the custom outline code to edit. Can be one of the PjCustomField constants.
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 the Code argument.
Phonetic Optional String The phonetic spelling of the Code argument, used for sorting order in Japanese. For languages other than Japanese, Phonetic is ignored.

Return value

Boolean

Remarks

If only the FieldID argument is specified, the LookUpTableAddEx method displays the Lookup Table dialog box for the specified custom outline code.

Example

This example shows 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; that is, it adds the new code at the third level of a two-level mask.

Sub LookupTableProblem() 
 Application.LookUpTableAddEx pjCustomTaskOutlineCode1, Level:=2, Code:="Q" 
 Application.LookUpTableAddEx pjCustomTaskOutlineCode1, Level:=3, Code:="Z" 
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.