/ Forums / Advansys Formativ / Creating Solutions with Formativ / How can I retreive the selected ListBox item? / Reply To: How can I retreive the selected ListBox item?

#7781
Support 1
Participant

Have you obtained the Documentation for Forms Designer and Components?

The ItemIndex property of the ListBox is a convenient way of getting the selected index:

  MsgBox IntToStr(FormName.ListBoxName.ItemIndex)

Here is a sample for getting the string data from the selected listbox item:

  dim I
  dim iValue

  I = FormName.ListBoxName.ItemIndex
  iValue = FormName.ListBoxName.Item.Strings(I)
  MsgBox iValue

I hope this helps.

Regards,
Advansys Support