GetCustomListNum Method

Applies To

Application object.

Description

Returns the custom list number for an array of strings. You can use this method to match both built-in lists and custom-defined lists.

Syntax

expression.GetCustomListNum(ListArray)

expression Required. An expression that returns an Application object.

ListArray Required Variant. An array of strings.

Remarks

This method generates an error if there's no corresponding list.

See Also

AddCustomList method, CustomListCount property, DeleteCustomList method, GetCustomListContents method.

Example

This example deletes a custom list.

n = Application.GetCustomListNum(Array("cogs", "sprockets", _
    "widgets", "gizmos"))
Application.DeleteCustomList n