The data linked to the selected item of the specified combo box. The property is not accessible in the Object Inspector.
object.SelectedData
| Part | Attribute | Type | Description |
|---|---|---|---|
object |
Required | The object always implements the
ISComboBox interface |
object
Fill in the specified combo box with the items that have some data linked and display the data of the selected item.
' The macro that fills in the specified combobox
Dim aComboBox
Dim aItems
Set aComboBox = Form.Controls_("cmbInform")
set aItems = aComboBox.Items
aItems.Clear
aComboBox.Sorted = true
aItems.AddData "Hanna", 100
aItems.AddData "Tanya", 200
aItems.AddData "Yulija", 300
aItems.AddData "Veronicka", 400
aItems.AddData "Katherina", 500
aItems.AddData "Helen", 600
aItems.AddData "Mary", 700
'The macro that displays the data of the selected item
Dim aComboBox
Dim aMessage
Set aComboBox = Form.Controls_("cmbInform")
aMessage = "Selected Data: " & aComboBox.SelectedData
Profile.MsgBox(aMessage)