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!..:)

Recommended Answers

All 2 Replies

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

thank you so muxh..:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.