i want to convert text box inputs into a list box. i have 7 text boxes like; fname, lname , email, phone, etc
how would would i call those textboxes into a list box. also it it possible to make headers for the the listbox.
Thanks for the help!
Printable View
i want to convert text box inputs into a list box. i have 7 text boxes like; fname, lname , email, phone, etc
how would would i call those textboxes into a list box. also it it possible to make headers for the the listbox.
Thanks for the help!
If you are talking about headers for a Listbox, think about using either a DataGridView or a ListView (in Detail mode) instead. Both of those have headers, whereas a Listbox will not.
And considering that suggestion, there is hardly any point in answering the original question. After all, if you decide that headers are important, then the means of entering data into a listbox isn't important, since entering data into a ListView or DGV would be considerably different, so which would you really like?
what i was trying to say was if i enter the data
Joe Doe
[email protected]
555-555-5555
each input has a seperate textbox for name , email, phone, how would i get that information into a listbox. So whatever the enter will be put in to the listbox.
You can doBut, as ShaggyHiker points out, you can't do headers with a listbox and your entries will not be uniform.Code:ListBox1.Items.Add Textbox1.text & " " & Textbox2.Text & " " & TextBox3.text
I echo the suggestion of switching to either a datagridview or a Listview (in Details mode)
Your question is a bit confusing? As Shaggy said ListBox doesnt have headers, so DGV would be a better option if your looking for Headers
In your post#3 you seem to be asking how to get TextBox info into a list box and doesnt mention headers?
With that said here is simple idea to put textbox info into to a list box
Hope this helpsCode:Me.ListBox1.Items.Add(Me.TextBox1.Text)
Me.ListBox1.Items.Add(Me.TextBox2.Text)
Thank You! ..... also what if i am using seperate forms do i need to do something else like friend?
you mean your textboxes are on different forms? try to be more clear when asking a question, take a few extra minutes to write out your question and re-read it to yourself and ask yourself, if you were reading it would it make sense to you??
If you have textboxes on seperate form
just reference the form
Form3.TextBox1.Text etc.. (Form3)or what ever form the textbox is on
MembersForm.MemberListBox.Items.Add(FNameTextBox.Text & " " & LNameTextBox.Text)
This is what i have and it is not working.
I have a membership form and a members form.
The textboxes are in the membership form and the listobx is on the members form.