Hi friends,
I have a requirement there are 4 radio buttons and 3 textbox and a
button. Radio button are addition, subtraction, multiplication, and
division. We will give data in two-textbox and find the output in
third textbox, when I check the respective radio button and click
button the operation will be shown in third textbox.
Thanks
Loading
Satyapriya NayakPosted Sep 5, 2011, 1:23 PM
Try this
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked Then
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
ElseIf RadioButton2.Checked Then
TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
ElseIf RadioButton3.Checked Then
TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
ElseIf RadioButton4.Checked Then
TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text)
End If
End Sub
Thanks
If this post helps you mark it as answer