Is it possible to use "Like" in a Select Case, such as,
Select Case Variable
Case Like "*jones"
How is this done?
According to the help, "Like" and "Is" can't be used as comparison operators
in "Select Case" statements.
If you want to avoid complicated "If" structures, you might perhaps use
Switch to set some variable, and then use "Select Case" with that:
myTestVar = Switch( _
myVar Like "*jones", "ends_with_jones", _
myVar Like "*smith", "ends_with_smith", _
myVar Like "*miller", "ends_with_miller")
Select Case myTestVar
Case "ends_with_jones"
...
Regards,
Klaus