Private Sub Timer1_Timer() Static nextheure As Integer If nextheure = 0 Then nextheure = calcule_nextheure() Exit Sub Else If Hour(Now) >= nextheure Then 'Tu colles ici tes instructions de remise à 0 nextheure = calcule_nextheure() End If End If End Sub Private Function calcule_nextheure() As Integer Select Case Hour(Now) Case Is < 6: nextheure = 6 Case Is < 14: nextheure = 12 Case Else: nextheure = 22 End Select calcule_nextheure = nextheure End Function
If monheur - eq_changeH = 8 Then
doit se faire à 6h, à 14h et à 22h
If monheur > 22 And monheur < 6 Then
private sub timer1_timer() if hour(time)=6 or hour(time)=14 or hour(time)=22 then if minute(time)=0 then if second(time)=0 then n=0 b=0 d=0 r=0 end if end if end if end sub
Private Sub Timer1_Timer() If Minute(Time) 0 And Second(Time) 0 Then If Hour(Time) 6 Or Hour(Time) 14 Or Hour(Time) = 22 Then n = 0 b = 0 d = 0 r = 0 s = 0 End If End If End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionIf monheur - eq_changeH = 8 Then
monheur=Hour(Time)
If monheur > 22 And monheur < 6 Then: faute d'inattention.