Private Sub Timer3_Timer() pass = True test = True Static monheure As Integer monheure = 0 ...
If monheure 0 Then monheure Hour(Time) If Hour(Time) > monheure Then w = 0 x = 0 y = 0 z = 0 monheure = Hour(Time) End If
Private Sub Timer1_Timer() Static monheure As Integer If monheure 0 Then monheure Hour(Time) If Hour(Time) >= monheure Then '..... tu mets à zéros chaque compteur monheure = Hour(Time) End If MsgBox monheure End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Timer1_Timer() Static monheure As Integer If monheure 0 Then monheure Hour(Time) If Hour(Time) >= monheure Then '..... tu mets à zéros chaque compteur monheure = Hour(Time) End If MsgBox monheure End Sub
n Val(pph) 0 'compteur à mettre à zéro b Val(bph) 0 'compteur à mettre à zéro d Val(dph) 0 'compteur à mettre à zéro
pph = 0 'compteur à mettre à zéro bph = 0 'compteur à mettre à zéro dph = 0 'compteur à mettre à zéro
Private Sub Timer2_Timer() i = 6 j = 14 k = 22 l = 45 'ditinction de l'équipe en cours If Hour(Time) >= i And Hour(Time) < j Then Equipe_1.BackColor = &HC000& Equipe_2.BackColor = &H808080 Equipe_3.BackColor = &H808080 End If If Hour(Time) >= j And Hour(Time) < k Then Equipe_2.BackColor = &HC000& Equipe_1.BackColor = &H808080 Equipe_3.BackColor = &H808080 End If If Hour(Time) >= k And Hour(Time) < i Then Equipe_3.BackColor = &HC000& Equipe_1.BackColor = &H808080 Equipe_2.BackColor = &H808080 End If End Sub Private Sub Timer3_Timer() pass = True test = True Static monheure As Integer monheure = 0 'equipe en cours If (Hour(Time) 6 Or Hour(Time) 14 Or Hour(Time) = 22) And Minute(Time) = 0 And Second(Time) = 0 Then n = 0 b = 0 d = 0 r = 0 End If If test = True Then n = n + 1 If pass = True Then b = b + 1 Else d = d + 1 r = r + 1 'à voir pour le retest End If End If If Equipe_1.BackColor = &HC000& Then e1 = n b1 = b d1 = d r1 = r Else If Equipe_2.BackColor = &HC000& Then e2 = n b2 = b d2 = d r2 = r Else e3 = n b3 = b d3 = d r3 = r End If 'problème de réinitialisation 'heure en cours If monheure 0 Then monheure Hour(Time) If Hour(Time) > monheure Then w = 0 x = 0 y = 0 z = 0 monheure = Hour(Time) End If End If If test = True Then w = w + 1 If pass = True Then x = x + 1 Else y = y + 1 z = z + 1 End If End If If test = True Then nbr_de_cartes_passées.Text = CStr(n) nbr_de_cartes_bonnes.Text = CStr(b) nbr_de_cartes_défaillantes.Text = CStr(d) nbr_de_retest.Text = CStr(r) pph.Text = CStr(w) bph.Text = CStr(x) dph.Text = CStr(y) rph.Text = CStr(z) End If 'problème de réinitialisation End Sub
monheur = Hour(Time) 'j'ai déclaré la variable monheure comme étant une variable global pour que ça fonctionne If Hour(Time) > monheure Then w = 0 x = 0 y = 0 z = 0 monheure = Hour(Time) End If