select case multiple conditions

  • Thread starter Thread starter Chris G
  • Start date Start date
C

Chris G

Is is possible to use a select case arrangement with more than one
conditional variable because if I nest it using another select case or an if
statement the code gets much longer and is not so easy to follow.

eg I tried something like this but couldn't get it to work
select case var_a, var_b
case var_a=x, var_b>10
case var_a=y, var_b>10
case var_a=x, var_b<11
etc
end case

Any alternative suggestions welcome

Thanks
 
Is is possible to use a select case arrangement with more than one
conditional variable because if I nest it using another select case or an if
statement the code gets much longer and is not so easy to follow.

eg I tried something like this but couldn't get it to work
select case var_a, var_b
case var_a=x, var_b>10
case var_a=y, var_b>10
case var_a=x, var_b<11
etc
end case

Any alternative suggestions welcome

Thanks

select case true
case var_a=x and var_b>10
case var_a=y and var_b>10
case var_a=x and var_b<11
etc
end case

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
 
Back
Top