Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, how can I add strings to a stringcollection in the settings, or add items to a list(Of String/Object) and how do you add it the items back in the stringcollection or (Of String/Object) to a Listbox.

Example:

StringCollection.Add(String)


I'm basically trying to store items into a listbox and I run a certain function, it will add the items to a Listbox.

StringCollection.AddRange(ListBox)


What I have tried:

I haven't tried anything yet, I wouldn't know how.
Posted
Updated 3-Jul-21 10:09am
Comments
The Other John Ingram 14-May-21 12:32pm    
try ListBox.Items.Add or AddRange if it exists for the entire list

1 solution

Try this:

VB
for i = 0 to Listbox1.Items.Count -1
     StringCollection.Add(ListBox1.Items(i))
Next
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900