REMOVE.LIST.ITEM macro

Removes an item in a list box or drop-down box.

Syntax

REMOVE.LIST.ITEM(index_num, count_num)

Index_num    specifies the index of the item to remove, from 1 to the number of items in the list. Specify zero to remove all items in the list.

Count_num   Specifies the number of items to delete starting from index_num. If omitted, only one item is removed.

Remarks

If count_num + index_num is greater than the number of items in the list, all items starting with index_num to the end of the list are removed.

Examples

REMOVE.LIST.ITEM(3,2) removes two items starting with the third item

REMOVE.LIST.ITEM(3) removes only the third item

Related Function

LISTBOX.PROPERTIES   Sets the properties of a list box and drop-down controls on worksheet and dialog sheets

Return to index