babyrock2009 > 22-11-14, 01:16 PM
babyrock2009 > 22-11-14, 03:13 PM
Minh Tiên > 22-11-14, 04:03 PM
Private Function DiemMaxMonMax()
Dim strMonMax As String, strArr1 As String, trDiemMax As Double, Ctrl As Control, Arr As Variant
Dim strArr()
strArr = Array(Me.Toan, Me.Ly, Me.Hoa, Me.Van, Me.AV)
strArr1 = "Toan,Ly,Hoa,Van,AV"
Arr = Split(strArr1, ",")
strDiemMax = Me.Toan
strMonMax = "Toan"
For i = 1 To UBound(strArr)
If strDiemMax > strArr(i) Then
strDiemMax = strDiemMax
strMonMax = strMonMax
Else
If strDiemMax = strArr(i) Then
strDiemMax = strDiemMax
Set Ctrl = Controls(Arr(i))
strMonMax = strMonMax & "," & Ctrl.Name
Else
If strDiemMax < strArr(i) Then
strDiemMax = strArr(i)
Set Ctrl = Controls(Arr(i))
strMonMax = Ctrl.Name
End If
End If
End If
Next
Me.DiemMax = strDiemMax
Me.MonMax = strMonMax
End Function
DiemMaxMonMax
babyrock2009 > 22-11-14, 04:38 PM