Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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,

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote