It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Need help writing array to textbox please.

Moderator: dafunkymunky

Need help writing array to textbox please.

Postby toppcon on Wed May 11, 2011 10:56 am

I have a list of objects in a comboBox and I wish to dump this list to a textBox on another form so I can print that form. I am reading the contents into an array and I can't get it to output into the textbox-except for the last value in the combobox that is. I changed the textbox max size to accomodate the data.

Here is my code:

Private Sub DisplayCountOfYachtTypesToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayCountOfYachtTypesToolStripMenuItem1.Click
Dim sizeForm As New Form4

For i = 0 To YachtComboBox.Items.Count - 1
myTotal(i) = (YachtComboBox.Items.Item(i))
Next

For j = 0 To YachtComboBox.Items.Count - 1
sizeForm.TextBox1.Text = myTotal(j) & vbCrLf

Next
sizeForm.Show()
End Sub

I used a msgbox to make sure the array is getting the input.
Can u tell me where i'm going wrong?
toppcon
 
Posts: 1
Joined: Wed May 11, 2011 10:52 am

Who is online

Users browsing this forum: No registered users and 0 guests