We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,304 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

text box to list box

I have a form with a text box and a form with a list box. I would like to be able to push a button on the form with the text box and have it be added to a list box. any help?

3
Contributors
3
Replies
10 Hours
Discussion Span
1 Year Ago
Last Updated
4
Views
Question
Answered
ng5
Light Poster
42 posts since Dec 2011
Reputation Points: 19
Solved Threads: 0
Skill Endorsements: 0

this will do that:

ListBox1.Items.Add(TextBox1.Text)
renzlo
Junior Poster
129 posts since Oct 2011
Reputation Points: 14
Solved Threads: 6
Skill Endorsements: 0

yes it is very simple, for example you have a formA having textbox and formB has a listbox , now put this coding at you button.

Try
            formB.listbox1.items.add(textbox1.text)
        Catch ex As Exception
            MsgBox(Err.Description)
        End Try

this will solve your prob .
Regards

M.Waqas Aslam
Master Poster
748 posts since Aug 2011
Reputation Points: 50
Solved Threads: 121
Skill Endorsements: 2

thanks for the help :)

ng5
Light Poster
42 posts since Dec 2011
Reputation Points: 19
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 1 Year Ago by M.Waqas Aslam and renzlo

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.1013 seconds using 2.69MB