In my last post i asked about making multiple buttons add a value into a textfield, and i got that working. but now i want to try and do something similar but with checkboxes , i essentially got it working but when i have multiple checkboxes the values mess up, and it either keeps adding everytime i click the checkbox or it keeps subtracting the value, its very strange:
my current code is
Dim myButtonValue As Integer = 1
if CheckBox1.value = true then
Sum = Sum + myButtonValue
tfield_value.Text = "$" + Str(sum)
else
Sum = Sum - myButtonValue
tfield_value.Text = "$" + Str(sum)
end if
- i have a property in the window that is called sum (integer)
the problem occurs when i have 2+ checkboxes and i want them to work parallel without effecting each other.
thank you