andy7789
asked on
VBA "Select Case" multiple conditions
Hi x-perts,
Is there a way to write a Select Case statement with a FEW executable Case options, i.e. when a=true and b = true?
of course, I can write all IF statements, but it would be much easier with Select Case
Thanks
Is there a way to write a Select Case statement with a FEW executable Case options, i.e. when a=true and b = true?
of course, I can write all IF statements, but it would be much easier with Select Case
Thanks
Select Case true
Case a
'do something
Case b
'do something
End select
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you mean:
Select Case true
Case a OR c OR d
'do something
Case b
'do something
End select
ASKER
Yes, if both the conditions are true, ex a = true and b = true, it will only execute the first, i.e. a=true condition and exit. Case b will not be checked and executed
what I need is to execute ALL individual Case statement, if the conditions are satisfied.
what I need is to execute ALL individual Case statement, if the conditions are satisfied.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is it possible somehow?