Select items from one ListBox into another <p>I have a two ListBoxes listbox1 and listbox2. I want to get all the duplicate items in ListBox1 that i'd search in a TextBox and put in into ListBox2 and when all the duplicate item's that i'd search is in ListBox2 its automatically count please help me.</p> <p>For example, items in ListBox1</p> <pre><code>DOG DOG DOG CAT CAT </code></pre> <p>When I type DOG in TextBox all the DOG in ListBox1 will be copied to ListBox2. How can I do it?</p> <p>I tried this</p> <pre><code>Dim check As Boolean For Each item In ListBox1.Items check = ListBox1.FindStringExact(item) ListBox2.Items.Add(item) Next </code></pre> <p>i also try this but its wrong it count's the line before the exact word that i'd search. for example DOG DOG DOG CAT CAT i'd search CAT in textbox the output in listbox2 is 3 here's my code :</p> <p>Dim check As String</p> <pre><code> check = ListBox1.FindStringExact(TextBox1.Text) ListBox2.Items.Add(check) </code></pre>