En effet, les paramètres ne sont plus les mêmes
J'ai donc pris une solution hybride, à terme on pourrait simplifier la macro.
Sub MajCotations()
Dim i%, k%, URL$, COT
k = Cells(Rows.Count, [REF].Column).End(xlUp).Row
Range(Cells(2, [Cotation].Column), Cells(k, [Cotation].Column)).Clear
On Error Resume Next
i = 4
avant = "</div><div class=""c-ticker__item c-ticker__item--value"">"
apres = "<span class=""c-ticker__currency"">"
DoEvents
ReDim COT(1 To k, 1 To 1)
COT(1, 1) = Cells(i, [Cotation].Column).Value
URL = Cells(i, [WWW].Column).Value
Application.StatusBar = "Mise à jour des cotations en cours …"
On Error Resume Next
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", URL, False
.Send
If .Status = 200 Then COT(i, 1) = Val(Split(Split(.responseText, avant)(1), apres)(0))
End With
Application.StatusBar = False
Cells(i, [Cotation].Column).Value = COT(i, 1)
i = 5
avant = "</h1><div class=""c-faceplate__info""><div class=""c-faceplate__values""><div class=""c-faceplate__price c-faceplate__price--inline""><span class=""c-instrument c-instrument--last"" data-ist-last>"
apres = "</span>"
DoEvents
ReDim COT(1 To k, 1 To 1)
COT(1, 1) = Cells(i, [Cotation].Column).Value
URL = Cells(i, [WWW].Column).Value
Application.StatusBar = "Mise à jour des cotations en cours …"
On Error Resume Next
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", URL, False
.Send
If .Status = 200 Then COT(i, 1) = Val(Split(Split(.responseText, avant)(1), apres)(0))
End With
Application.StatusBar = False
Cells(i, [Cotation].Column).Value = COT(i, 1)
End Sub