This property is True if the items of the specified combo box are sorted. The property is not accessible in the Object Inspector.
object.Sorted
| Part | Attribute | Type | Description |
|---|---|---|---|
object |
Required | The object always implements the
ISComboBox interface |
bool
Display Sorted for the specified combo box.
Dim aComboBox
Dim aItems
Dim i
Dim aContent
Dim aComboBoxInfo
Set aComboBox = Form.Controls_("cmbInform")
set aItems = aComboBox.Items
aItems.Clear
aComboBox.Sorted = true
aItems.Add("Hanna")
aItems.Add("Tanya")
aItems.Add("Yulija")
aItems.Add("Veronicka")
aItems.Add("Katherina")
aItems.Add("Helen")
aItems.Add("Mary")
for i = 0 to aItems.Count - 1
aContent = aContent & vbNewLine & "- " & aItems.Strings(i)
next
aComboBoxInfo =_
"Caption: " & aComboBox.Caption & vbNewLine &_
"ShortName: " & aComboBox.ShortName & vbNewLine &_
"ComboBox Sorted = " & aComboBox.Sorted & vbNewLine &_
"ComboBox Items:" & aContent
Profile.MsgBox(aComboBoxInfo)