select case multiple conditions

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
 
T

T Lavedas

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/
 

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

Top