1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| TextBox1.SetFocus
' Se positionner sur la page 1
Me.MultiPage1.Value = 0
ResMin = 9 ^ 9
ResMax = 0
ResVitMin = 9 ^ 9
ResVitMax = 0
ResTempsMin = 50000
ResTempsMax = 0
With Application
For Each Sh In Worksheets
If Sh.Name <> "Paramètre" And Sh.Name <> "Graphique" Then
'Date mini
If .Small(Sh.[B:B], 2) < ResMin And .Small(Sh.[B:B], 2) > 0 Then
ResMin = .Small(Sh.[B:B], 2)
Me.Label33 = .Index(Sh.[A:A], .Match(.Small(Sh.[B:B], 2), Sh.[B:B], 0), 1)
End If
'Date maxi
If .Max(Sh.[B:B]) > ResMax And .Max(Sh.[B:B]) > 0 Then
ResMax = .Max(Sh.[B:B])
Me.Label34 = .Index(Sh.[A:A], .Match(.Max(Sh.[B:B]), Sh.[B:B], 0), 1)
End If
'Vitesse mini
If .Small(Sh.[D:D], 2) < ResVitMin And .Small(Sh.[D:D], 2) > 0 Then
ResVitMin = .Small(Sh.[D:D], 2)
Me.Label37 = .Index(Sh.[A:A], .Match(.Small(Sh.[D:D], 2), Sh.[D:D], 0), 1)
End If
'Vitesse maxi
If .Max(Sh.[D:D]) > ResVitMax And .Max(Sh.[D:D]) > 0 Then
ResVitMax = .Max(Sh.[D:D])
Me.Label38 = .Index(Sh.[A:A], .Match(.Max(Sh.[D:D]), Sh.[D:D], 0), 1)
End If
'Temps mini
If IsNumeric(.Small(Sh.[C:C], 2)) Then
If .Small(Sh.[C:C], 2) < ResTempsMin And .Small(Sh.[C:C], 2) > 0 Then
ResTempsMin = .Small(Sh.[C:C], 2)
Me.Label43 = .Index(Sh.[A:A], .Match(.Small(Sh.[C:C], 2), Sh.[C:C], 0), 1)
End If
End If
'Temps maxi
If IsNumeric(.Max(Sh.[C:C])) Then
If .Max(Sh.[C:C]) > ResTempsMax And .Max(Sh.[C:C]) > 0 Then
ResTempsMax = .Max(Sh.[C:C])
Me.Label44 = .Index(Sh.[A:A], .Match(.Max(Sh.[C:C]), Sh.[C:C], 0), 1)
End If
End If
End If
Next Sh
Me.Label29.Caption = Format(ResMin, "# ##0.000")
Me.Label30.Caption = Format(ResMax, "# ##0.000")
Me.Label39.Caption = Format(ResVitMin, "# ##0.000")
Me.Label40.Caption = Format(ResVitMax, "# ##0.000")
Me.Label45.Caption = Format(ResTempsMin, "hh:mm:ss")
Me.Label46.Caption = Format(ResTempsMax, "hh:mm:ss")
End With
End Sub |
Partager