This documentation is archived and is not being maintained.

Application.DeleteCustomList Method

Office 2007
Deletes a custom list.

Syntax

expression.DeleteCustomList(ListNum)

expression   A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
ListNumRequiredLongThe custom list number. This number must be greater than or equal to 5 (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 5 or if there's no matching custom list.

Example

This example deletes a custom list.

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



Show: