Please help with multiple choise

M

MN

If Ct1=1 then st=1
if Ct2=1 then st=2
if ct3=1 then st=3
if ct4=1 then st=4
if ct5=1 then st=6
If more than one of above marked then st=5.
How can I do that in VB ?
Thank you all in advance!
 
M

Mike Painter

MN said:
If Ct1=1 then st=1
if Ct2=1 then st=2
if ct3=1 then st=3
if ct4=1 then st=4
if ct5=1 then st=6
If more than one of above marked then st=5.
How can I do that in VB ?
Thank you all in advance!
Dim count as Integer
Count = 0
If Ct1=1 then
st=1
Count = Count + 1
End If
If Ct2=1 then
st=2
Count = Count + 1
End If

All teh way down.

If Count > 1 then
st=5
end if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top