Link to home
Start Free TrialLog in
Avatar of jcartercarter
jcartercarterFlag for United States of America

asked on

How do I insert values into a listbox on a Windows form using vb.net

In a Windows form application, I'm collecting a beginning number and an ending number and I want to iterate through the range and insert each value into a listbox. I'm pretty new to vb.net and would appreciate any help you can provide me.
ASKER CERTIFIED SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Apologies, line 5 should read:

lstMyNumbers.Items.Add(i)
Avatar of jcartercarter

ASKER

Your right. tostring is not neccessary and I was going to tell you 'Add' is not a member of 'System.Windows.Forms.ListBox'. Adding 'Item' was the key. Thanks for the quick response.
Why do you grade a B when you don't first give me a follow-up comment on why this is not completely to your satisfaction? Grading at EE is not like school, instead they follow the 10 points must principle: it's an A unless....

Please reconsider your grade if you agree, or follow-up with an explanation so that I understand where you're coming from: https://www.experts-exchange.com/help.jsp?hi=404