Application.CustomFieldValueList method (Project)

Sets options for a value list for a custom field.

Syntax

expression. CustomFieldValueList( _FieldID_, _ListDefault_, _DefaultValue_, _RestrictToList_, _AppendNew_, _PromptOnNew_, _DisplayOrder_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
FieldID Required Long The custom field. Can be one of the PjCustomField constants.
ListDefault Optional Boolean True if a value in the list functions as the default for the custom field.
DefaultValue Optional String The item in the value list that is the default for the custom field. If ListDefault is False, DefaultValue is ignored.
RestrictToList Optional Boolean True if the only values allowed in the custom field are those from the value list.
AppendNew Optional Boolean True if new values entered into the custom field are automatically added to the value list. If RestrictToList is False, AppendNew is ignored.
PromptOnNew Optional Boolean True if the user is prompted to confirm that a new value is to be added to the list. If AppendNew is False, PromptOnNew is ignored.
DisplayOrder Optional Long The order in which the items in a value list are displayed in the drop-down list for a cell. Can be one of the following PjListOrder constants: pjListOrderDefault, pjListOrderAscending, or pjListOrderDescending.

Return value

Boolean

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.