Sorted Property

See Also2O447VS

Applies To

Combo box1YZXFF6, list boxG11UCK.


Specifies whether the elements of a combo box or list box are automatically sorted alphabetically; read-only at run time.


[form.]{ combobox | listbox}.Sorted


The Sorted property settings are:

Setting          Description


True              List items are sorted alphabetically (case-insensitive).

False             (Default) List items are not sorted alphabetically.



When set to True, Visual Basic handles almost all necessary string processing to maintain alphabetical order, including changing the index numbers for items as required by the addition or removal of items.


Note   Using the AddItem2BIX3OB method to add an element to a specific location in the list may violate the sort order, and subsequent additions may not be correctly sorted.


Data Type

IntegerDOKXHY (Boolean)

See Also


AddItem Method2BIX3OB

List PropertyBKCX6E

ListCount Property4E91QN

ListIndex Property4K7KHR

RemoveItem MethodM867OS


Programmer's Guide:

Chapter 3, "Creating and Using Controls"