Merci bien mais je nage complètement!!
Je vous met le code pour modifications;merci
Option Explicit
Private Heure As Double
Sub PlanifTurf()
DéplanifTurf
Heure = Now + TimeSerial(0, 15, 0)
Application.OnTime Heure, "Turf"
End Sub
Sub DéplanifTurf()
If Heure = 0 Then Exit Sub
Application.OnTime Heure, "Turf", Schedule:=False
Heure = 0
End Sub
Sub Turf()
Dim ScriptControl As Object, PMU As Object
Dim Ecurie As Object, Cheval As Object, Drd As Object, Gp As Object
Dim Site As String, i As Long
Set ScriptControl = CreateObject("MSScriptControl.ScriptControl")
ScriptControl.Language = "JScript"
Site = "
https://offline.turfinfo.api.pmu.fr/rest/client/7/programme/17112018/R1/C7/participants"
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", Site, False
.send
Set PMU = ScriptControl.Eval("(" + .responseText + ")")
.abort
End With
i = 2
Set Ecurie = PMU.participants
On Error Resume Next
For Each Cheval In Ecurie
With ActiveSheet
.Cells(i, 1).Value = Cheval.numPmu
.Cells(i, 2).Value = Cheval.nom
Set Drd = Cheval.dernierRapportDirect
.Cells(i, 3).Value = Drd.rapport
i = i + 1
End With
Next Cheval
Set Drd = Nothing
Set Gp = Nothing
Set Ecurie = Nothing
Set PMU = Nothing
Set ScriptControl = Nothing
Sub PlanifTurf()
DéplanifTurf
Heure = Now + TimeSerial(0, 15, 0)
Application.OnTime Heure, "Turf"
End Sub
End Sub