title: Get the selected item in a listbox
body: <p>I am new to VB6. I need to get the selected item in a listbox
  to set its content to be the text of a textbox when I press the <code>Modify</code> button.</p>
  
  <pre><code>Private Sub Modify_Click()
      List2.List(0) = Text3.Text
  End Sub
  </code></pre>
  
  <p>I need to change index 0 for the selected item from the listbox.</p>
  
  <p>In VB.Net, I used the following statement but, in VB6, I don't know how to do it.</p>
  
  <pre><code>val=ListBox2.SelectedItem.Value 
  </code></pre>