- Mar 1, 2000
- 30,890
- 5,001
- 126
There has to be an easy way to do this, but I'm just drawing a blank right now.
I have 4 NumericUpDown boxes and 4 corresponding checkboxes
and a simple formula:
However, I only want each value to be added into the FC_Amount if it's corresponding check box is checked.
So if only CheckBox3 is checked, then:
If Checkbox2 and Checkbox4 are checked, then:
There has to be an easier way than putting in all 24 possible combinations.
I have 4 NumericUpDown boxes and 4 corresponding checkboxes
and a simple formula:
Code:
Dim FC_Amount As Decimal
FC_Amount = Ck1Amount.Value + Ck2Amount.Value + Ck3Amount.Value + Ck4Amount.Value
However, I only want each value to be added into the FC_Amount if it's corresponding check box is checked.
So if only CheckBox3 is checked, then:
Code:
FC_Amount = Ck3Amount.Value
If Checkbox2 and Checkbox4 are checked, then:
Code:
FC_Amount = Ck2Amount.Value + Ck4Amount.Value
There has to be an easier way than putting in all 24 possible combinations.
Last edited: