Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Case Question

Status
Not open for further replies.

mwa

Programmer
Jul 12, 2002
507
US
Is it possible to have a Select Case statement that checks against multiple values?

Instead of this:
Code:
Select Case strValue
     Case "XXX"
         'Do Something
     Case "YYY"
         'Do the same thing
     Case "ZZZ"
         'Do the same thing again
     Case Else
         'Do something Different  
End Select
Is there something like this:
Code:
Select Case strValue
     Case ("XXX", "YYY", "ZZZ")
         'Do something
     Case Else
         'Do something Different  
End Select

Thanks In advance...

mwa
<><
 
And how is this done?

mwa
<><
 
Select Case strValue
Case "XXX", "YYY", "ZZZ"
'Do something
Case Else
'Do something Different
End Select



Vince
 
Shoot... I almost had it...

Thanks.

mwa
<><
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top