Hi,
I just started taking a VB.Net class and need some help with my first assignment. I can't figure out the syntax code for how to add text to a Listbox. My assignment is to add a Listbox to a form and then add specific text to the Listbox. I need to show my code.
I tried ListBox1.Item = "text" but this isn't working. Any help would be much appreciated.
Shahab
How to code Listbox - beginner's help
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Solitaire85 pointsPosted Jun 14, 2006, 4:51 PM EDT
Try this:
LIstBox1.Items.Add("text")
or to add items from a textbox:
LIstBox1.Items.Add(Textbox1.Text)
1 short reply
shahab mushtaq3 pointsPosted Jun 15, 2006, 11:40 AM EDT