1,105,232 Community Members

text box to list box

Member Avatar
ng5
Light Poster
42 posts since Dec 2011
Reputation Points: 9 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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?

Member Avatar
renzlo
Junior Poster
143 posts since Oct 2011
Reputation Points: 4 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

this will do that:

ListBox1.Items.Add(TextBox1.Text)
Member Avatar
M.Waqas Aslam
Practically a Posting Shark
837 posts since Aug 2011
Reputation Points: 67 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 4 [?]
Featured
 
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

Member Avatar
ng5
Light Poster
42 posts since Dec 2011
Reputation Points: 9 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

thanks for the help :)

Question Answered as of 2 Years Ago by M.Waqas Aslam and renzlo
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: