Thread: Select Case
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Select Case

ML wrote:
Did that work Alan?
I noticed that msgboxs really work best when they are strings or converted
to a string strconv(etc, etc)

Mark

"Alan Beban" wrote:


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


Yes, it was not a message box problem. It worked when "Case Is 2 Or 4"
was replaced with "Case 2, 4". I'm still curious why while it didn't
throw a compile error (i.e., the syntax seems OK), it still didn't work
the way I posted it.

Thanks for your interest.

Alan Beban