Dear All
I am getting confused with a select case statement and I would like some
help.
Dim Day1Max
Dim TargetLow
Dim TargetHigh
Day1Max = 55
TargetLow = 63
TargetHigh = 90
Select case Cint(Day1Max)
Case >= 1 and <= Cint(TargetLow)
Day1Graph = 1
Case Cint(Day1Max) >= Cint(TargetLow) and Cint(Day1Max) =<
Cint(TargetHigh)
Day1Graph = 2
Case Cint(Day1Max) > Cint(TargetHigh)
Day1Graph = 3
case else
Day1Graph = 4
End select
What I am testing is:
If Day1Max < 62 then Day1Graph = 1
If Day1Max >= 63 and <= 89 then Day1Graph = 2
If Day1Max >= 90 the Day1Graph = 3
I can't hard code the values because the variable values are returned from a
stored procedure and vary with each person.
This select statement always returns Day1Graph as 4. How would I change the
Select Case statement to work? Do I need to Cint the value?
Thanks...
Alastair MacFarlane