|
-
Nov 20th, 2000, 05:27 PM
#1
Thread Starter
Lively Member
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.
-
Nov 20th, 2000, 05:35 PM
#2
Addicted Member
Not sure what your are asking, maybe try to explain a bit more.
-|- Hurgh! -|-
-
Nov 20th, 2000, 05:39 PM
#3
Fanatic Member
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
-
Nov 20th, 2000, 05:42 PM
#4
_______
<?>
If chk1.value = true and chk2.value = true Then
'bal bla
End If
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|