smchoudhury
Programmer
Hi there,
At present i add 50 to any textbox value when a checkbox is selected. What i want is if someone selects a checkbox then wishes to de-select it; the value which was added earlier to be minused from the value inside the textbox.
Present scenario
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
TextBox1.Text = TextBox1.Text + (ComboBox1.SelectedItem * 0.5)
End If
End Sub
What i want:
if a user de-selects that cehcekbox the calculation should work out:
TextBox1.Text = TextBox1.Text - (ComboBox1.SelectedItem * 0.5).
I'm not sure how to specify the de-select part.
thanks,
Mahmud
At present i add 50 to any textbox value when a checkbox is selected. What i want is if someone selects a checkbox then wishes to de-select it; the value which was added earlier to be minused from the value inside the textbox.
Present scenario
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
TextBox1.Text = TextBox1.Text + (ComboBox1.SelectedItem * 0.5)
End If
End Sub
What i want:
if a user de-selects that cehcekbox the calculation should work out:
TextBox1.Text = TextBox1.Text - (ComboBox1.SelectedItem * 0.5).
I'm not sure how to specify the de-select part.
thanks,
Mahmud