NewIndex Property

See Also48O02C                 ExampleF4IZ3M>Low

Applies To

Combo box1YZXFF6, list boxG11UCK.


Specifies the index1L6K9K3 of the item most recently added to a combo box or list box.  Not available at design time; read-only at run time.


[form.]{ combobox|listbox}.NewIndex


This property is useful with sorted lists when you need a list of values that correspond to each item in the ItemDataJDHGK8 property array.  As you add an item in a sorted list, Visual Basic inserts the item in the list alphabetically.  This property tells you where the item was inserted so that you can insert a corresponding value in the ItemData property at the same index.

NewIndex will return -1 if there are no items in the list or if an item has been deleted since the last item was added.

Data Type


See Also


AddItem Method2BIX3OB

Clear MethodPMJHM6

List PropertyBKCX6E

ListCount Property4E91QN

MultiSelect PropertyYICVLQ

RemoveItem MethodM867OS

Selected PropertyKC8D7W

TopIndex Property2EAX0Z


Programmer's Guide:

Chapter 3, "Creating and Using Controls"