Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27099

[RESOLVED] Take data from listbox in form1 and put it in listbox from form2

$
0
0
I have two forms in my project.
Form1 Has data in it's listbox

I need Form2 to copy that data and put it in the listbox on form2

I was thinking:
ListBox1.Items = Form1.ListBox1.Items
Would work, but it is not.

I also need something like:
ListBox1.SelectedIndex = Form1.ListBox.SelectedIndex

But I am getting an error:
Property "Items" it Read Only

I may be an idiot and just doing it wrong, but I am puzzled and could not find this on Google.

Viewing all articles
Browse latest Browse all 27099

Trending Articles