-
Here is what I have so far (practice program):
Private Sub cmdCalc_Click()
If chk1 = 0 Then
txt1a.Text = txt1 * txtA
txt2a.Text = txt2 * txtB
txtAve.Text = Round((Val(txt1a) + Val(txt2a)) / (Val(txt1) + Val(txt2)), 3)
Else
txt1a.Text = txt1 * txtA
txt2a.Text = txt2 * txtB
txt3a.Text = txt3 * txtC
txtAve.Text = Round((Val(txt1a) + Val(txt2a) + Val(txt3a)) / (Val(txt1) + Val(txt2) + Val(txt3)), 3)
end if
It does work. The problem is that there is another check box option in my program (chk2).
Is there a way to include it with its function into this code. Something to the twist of:
If chk1 = 0 and chk2 = 0 then.....blah blah
something along those lines.
Not sure if this makes sense.
Thank you.
-
Not sure what your are asking, maybe try to explain a bit more.
-|- Hurgh! -|-
-
I am not sure what your asking, especially without knowing what chk2 does. But you can use and/or if statements, if thats what your asking:
If chk1 = 0 And chk2 = 0 Then blah... blah or
If chk1 = 0 Or chk2 = 0 Then .........
I am not sure if I'm on the right track or not.
JO
-
<?>
If chk1.value = true and chk2.value = true Then
'bal bla
End If