On Aug 26, 2006, at 2:43 PM, Terry Ford wrote:
Try this with an editfield and a pushbutton with this in the Action
Code:
Dim a As Integer
a=val(EditField1.Text)
Select Case a
Case 1
MsgBox str(a)
Case Is = 2
MsgBox str(a)
Case Is>10,9
MsgBox str(a)
End Select
OK... what is wrong? The message box will only display for values:
1, 2, 9 and values of 11 and greater. Everything seems logical to me.
"Case 1" is normal syntax.
"Case Is = 2" is strange but is the equivalent to "Case 2"
"Case Is>10,9" is the only one which is more complex, but not when
you consider the comma to separate conditions. You could write this
as an if statement like this:
If (a > 10) Or (a = 9) Then
This particular case statement does not have an "Else" so there is no
catch-all behavior for values which fall outside that range.
_______________________________________________
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>