Hello everyone, i'm stuck with this.
i try to find fastest way, but its only fits for certain sequence of number
here is what i want:
Points Ranks
10 5
25 4
38 3
35 2
90 1
assuming that all points is on a label named lblTotPts(0 to 4)
and all Ranks is on a label named lblRank(0 to 4)
im using this code
it works only on some sequence of number. but its returned like this, if the first number was on rank 5.Code:Dim PM For x = 1 To 5 For i = 1 To 5 - 1 If lblRank(i).Caption = "" Then If Val(lblTotPts(i).Caption) > Val(lblTotPts(PM).Caption) Then PM = i End If End If Next lblRank(PM).Caption = x PM = 0 Next
Points Ranks
5 5
4
3
2
1
as i change the ">" sign to "<" it works for that sequence, but not for this:
Points Ranks
1 5
2
3
4
5
so, how to do that using a fast way (looping) because the actual element (lblRank and lblTotPts) on my project is not only contains 5 controls.
thanks before![]()




Reply With Quote