RemoveItem Method (AComboBox)

Removes an item from the object at the specified index.

Syntax

[ lRemoveItem = ] Object.RemoveItem ( lIndex )

The RemoveItem method syntax has the following parts:

 

Name

Type

Description

Object

AComboBox

A ComboBox control

lIndex

Val Long

Removes an item from the control at a position specified by lIndex.

lRemoveItem

Long

The return value is a count of the strings remaining in the list.

Comments

The return value is -1 if the lIndex parameter specifies an index greater than the number of items in the list.

Example

The following example will remove the 8th item in the AComboBox:

lcb1RemoveItemCountRemaining = cb1.RemoveItem(7)

Applies to

AComboBox

See Also

AddItem, Clear, FindItem, InsertItem, ListCount