If (intPackav) > 0 Then Select Case (intPackav) Case Is 10 to 19 dblPackafullv =
ID: 3528438 • Letter: I
Question
If (intPackav) > 0 Then Select Case (intPackav) Case Is 10 to 19 dblPackafullv = (dblPriceav - (dblPriceav * 0.2)) * intPackav Case Is 20 to 49 dblPackafullv = (dblPriceav - (dblPriceav * 0.3)) * intPackav Case Is 50 to 99 dblPackafullv = (dblPriceav - (dblPriceav * 0.4)) * intPackav Case Is > 100 dblPackafullv = (dblPriceav - (dblPriceav * 0.5)) * intPackav End Select
I keep getting "relational operator expected" in reference to "10","20", and "50"as an error please help
Explanation / Answer
For the below three 'Case' situations, you are checking for the range. Case Is 10 to 19 Case Is 20 to 49 Case Is 50 to 99 You need to mention something like below. If (intPackav) > 0 Then Select Case (intPackav) Case (10:19) dblPackafullv = (dblPriceav - (dblPriceav * 0.2)) * intPackav Case (20:49) dblPackafullv = (dblPriceav - (dblPriceav * 0.3)) * intPackav Case (50:99) dblPackafullv = (dblPriceav - (dblPriceav * 0.4)) * intPackav Case > 100 dblPackafullv = (dblPriceav - (dblPriceav * 0.5)) * intPackav End Select Hope this helps. Thanks,
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.