J
John
Here's a code sample that recreates a problem I've
encountered with the Select Case statement. The value
does not trigger the appropriate Case statement. Any
ideas?
Many thanks!
Function fnTestSelect() As Integer
Dim dblValue As Double
dblValue = 25.1
Select Case dblValue
Case Is <= 10
MsgBox "<= 10"
Case Is > 10 And dblValue <= 15
MsgBox "> 10 and <= 15"
Case Is > 15 And dblValue <= 20
MsgBox "> 15 and <= 20"
Case Is > 20
MsgBox "> 20"
End Select
End Function
encountered with the Select Case statement. The value
does not trigger the appropriate Case statement. Any
ideas?
Many thanks!
Function fnTestSelect() As Integer
Dim dblValue As Double
dblValue = 25.1
Select Case dblValue
Case Is <= 10
MsgBox "<= 10"
Case Is > 10 And dblValue <= 15
MsgBox "> 10 and <= 15"
Case Is > 15 And dblValue <= 20
MsgBox "> 15 and <= 20"
Case Is > 20
MsgBox "> 20"
End Select
End Function