Thread: Select Case
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Select Case

Try something like

Select Case X
Case 1, 3
Debug.Print "Number is either 1 or 3"
Case 2, 4
Debug.Print "Number is either 2 or 4"
Case Else
Debug.Print "Other number"
End Select


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Alan Beban" wrote in message
...
Sub abtest4()
x = 4
Select Case x
Case Is = 2 Or 4
MsgBox x
End Select
End Sub

I get no message box when I run the above. What am I missing?

Thanks,
Alan Beban