Please help with multiple choise

  • Thread starter Thread starter MN
  • Start date Start date
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!
 
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
 
Back
Top