I have coded these few lines below. The code correctly works when I connect through a VPN but no longer works outside VPN. The returned status code is 12007 out VPN and 200 with the VPN.
For example, you can use myUrl : "https://www.boursedirect.fr/fr/marche/euronext-paris/lyxor-ep-na-us-LU1832418856-MUA-EUR-XPAR/seance"
Do you have any idea how to resolve this difficulty?
Public Function InterrogationCours(myUrl) As Double
Dim avant as String, apres as String, cotation As String
avant = "quotation-last bd-streaming-select-value-last"
apres = "</span"
On Error Resume Next
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", myUrl, False
.Send
Debug.Print .Status
If .Status = 200 Then cotation = Split(Split(Split(.responseText, avant)(1), ">")(1), apres)(0)
End With
InterrogationCours = Nettoyage(cotation)
End Function