DeleteCustomList Method

Applies To

Application Object.

Description

Deletes a custom list.

Syntax

object.DeleteCustomList(listNum)

object

Required. The Application object.

listNum

Required. The custom list number. This number must be greater than or equal to five (Microsoft Excel has four built-in custom lists that cannot be deleted).

Remarks

This method generates an error if the list number is less than five or a matching custom list does not exist.

See Also

AddCustomList Method, CustomListCount Property, GetCustomListContents Method, GetCustomListNum Method.

Example

This example deletes a custom list.


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