If you only care about 1 and 2, you may also write:
Select Case n
Case 3
msgbox "3"
Case 4
msgbox "4"
Else
if n=1 then
msgbox "1"
end if
msgbox "1,2"
End Select
But I don't think you are looking for that.
Le 21 juin 06 à 21:43 Soir, GregO a écrit:
On Jun 20, 2006, at 4:13 pm, Norman Palardy wrote:
On Jun 20, 2006, at 1:50 PM, GregO wrote:
Anyone know if there's a way to get a Case statement to fall
through to the next one if they are both valid?
e.g.:
Select Case n
Case 1
msgbox "1"
Case 1,2
msgbox "1,2"
End Select
I'd like both messageboxes to appear if n=1.
This does not work as this is not C
RB's cases do not fall through to the next one
Use a series of if statements
Ew. Yeah, that's what I ended up doing, and it's ok if you have
only three or four to do, but what a pain to do this for 15 or 20
case statements. Grrrr..... Guess I'll write a tool to convert it.
Thanks everybody.
GregO
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>