It makes no sense to put the combobox items into a text file, especially since you can access which items are in the combobox immediately, and add or remove items. Create a StringBuilder and then loop through the items. My example below assumes textbox1.text contains the string you are looking for.
http://www.dotnetperls.com/stringbuilder-vbnetCode:Dim builder As New System.Text.StringBuilder For Each comboItem In ComboBox1.Items If comboItem = TextBox1.Text Then builder.AppendLine(comboItem) End If Next comboItem MsgBox(builder.ToString)




Reply With Quote
