Option Explicit
Private P As Planification
Public Sub LancerPlanif(ByVal Source As Planification, ByVal Heure As Date)
Set P = Source
Application.OnTime Heure, "OnTime_Joue"
End Sub
Public Sub AnnulerPlanif(ByVal Heure As Date)
On Error Resume Next
Application.OnTime Heure, "OnTime_Joue", Schedule:=False
Set P = Nothing
End Sub
Public Sub OnTime_Joue()
If P Is Nothing Then Exit Sub
P.OnTime_Joue_DécrèteÉchoit
Set P = Nothing
End Sub