0

hi,

i have 2 combo boxes. both values are integers and i want to add the values of the two combo boxes and display the sum to a label..how is it possible?

guys, please help

thanks much!..:)

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by airesh
0

See if this helps.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If ComboBox1.Text = Nothing OrElse ComboBox2.Text = Nothing Then Exit Sub
        Label1.Text = CInt(ComboBox1.Text) + CInt(ComboBox2.Text) '// CInt = Convert to Integer, since .Text is considered a String.
    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.