text box problems

smurf m

New member
Joined
Apr 29, 2010
Messages
1
Programming Experience
Beginner
i was just wondering how i would go about copying an int value from one text box to another

i have a list of numbers in a list box and when you click on one the value gets sent to a text box

i have an add button when it is clicked the value gets sent from the textbox to another text box.

i would like to know how i would go about doing this with several text boxes whilst not changing the info in the previous text boxes here is some code i have produced.

it works the first two times but then after it just keeps changing the value in the second text box.

VB.NET:
 Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click


        If odds1.Text = 0 Then
            odds1.Text = Val(HOddsTextBox.Text)
        ElseIf odds1.Text <> 0 Then
            odds2.Text = Val(HOddsTextBox.Text)
        ElseIf odds2.Text <> 0 Then
            odds3.Text = Val(HOddsTextBox.Text)
        End If



    End Sub
 
Back
Top