Hi all,
I am having a real headache trying to pull in a stock quote from SANTIAGOX with VBA (The price is the attached image).
This is what I get so far on my macro:
Can anyone help me telling me what I am missing or doing wrong?
Thanks in advance
I am having a real headache trying to pull in a stock quote from SANTIAGOX with VBA (The price is the attached image).
This is what I get so far on my macro:
VBA Code:
Sub Precios()
Dim request As Object
Dim response As String
Dim html As New HTMLDocument
Dim website As String
Dim price As Variant
website = "https://www.bolsadesantiago.com/resumen_instrumento/AESGENER"
Set request = CreateObject("MSXML2.XMLHTTP")
request.Open "GET", website, False
request.setRequestHeader "If-Modified-Since", "Sat, 1 dic 2020 00:00:00 GMT"
request.send
response = StrConv(request.responseBody, vbUnicode)
html.body.innerHTML = response
precio = html.getElementsByClassName("text-muted ng-binding")(1).innerText
MsgBox precio
End Sub
Can anyone help me telling me what I am missing or doing wrong?
Thanks in advance