How can I use a case select to select "like" or not. Is it the equivalent of what the where statement would look like? Would something like the following work?
select Case x
case not (972)*
...
case *(1)*
.....
end select
Thanks
Zave
How can I use a case select to select "like" or not. Is it the equivalent of what the where statement would look like? Would something like the following work?
select Case x
case not (972)*
...
case *(1)*
.....
end select
Thanks
Zave

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Select Case doesn't work with Like. You can use a series of Ifs and ElseIfs:
If x Not Like "(972)*" Then
...
ElseIf x Like "*(1)*"
...
End If
Or you can use the famous "Select Case True" technique. Sample:<pre>Select Case True
Case x Not Like "(972)*"
...
Case x Like "*(1)*"
.....
End Select</pre>