title: removing multiple selected items in a listbox - code only recognising first selection
body: <p>I have two listboxes and am trying to add items from List 1 to List 2, and then be able to remove multiple items from List 2 at once. Note that List 1 stays stagnant (this is how it is supposed to be).</p>
  
  <p>I have the adding items working right:</p>
  
  <pre><code>'Add the selected items to List 2
  Dim i As Integer
  
  If lst1.ItemsSelected.Count &gt; 0 Then
      i = 0
      While i &lt; lst1.ListCount
          If lst1.Selected(i) Then
              lst2.AddItem (lst1.ItemData(i) &amp; ";" &amp; lst1.Column(1, i) &amp; ";")
              lst1.Selected(i) = False
          End If
          i = i + 1
      Wend
  End If
  </code></pre>
  
  <p>However, when I try to remove the items from List 2 in a similar way, it only recognises the first selected item as selected and skips over the other items that I have selected. This is the problem. Here is my code:</p>
  
  <pre><code>'Remove the selected items from List 2
  Dim i As Integer
  
  If lst2.ItemsSelected.Count &gt; 0 Then
      i = lst2.ListCount - 1
      While i &gt;= 0
         If lst2.Selected(i) Then
             lst2.RemoveItem (i)
             lst2.Selected(i) = False
         End If
          i = i - 1
      Wend
  End If
  </code></pre>
  
  <p>How can I get this working correctly?</p>