>Yes, I tried this combinations before but, in the example below:
>
>1, 8, 3, 4
>
>The messagebox "price 3 is incorrect will be displayed"
>It looks like price 3 is incorrect because 3 is less then 8, but price 2 is really incorrect
>
>So this kind of code does not work
>
>Any other idea ?
>
>Moises
It is really a matter of definition, which price is correct. The user can either lower price 2, or increase prices 3 and 4.
Here is another example:
1, 3, 7, 6
How should your program know where the user made a mistake, and whether the third price should be lower, or the fourth price higher?
Perhaps you better just have the user check:
if not (price1 < price2 and price2 < price3 and price3 < price4)
MessageBox("Please put the prices in increasing order.")
endif
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)