Hi,
How can I change the code to past the result to a cell instead of a msg box.
Thank you!
******************
Sub Import_SpecificData()
Dim request As Object
Dim response As String
Dim html As New HTMLDocument
Dim website As String
Dim total As Variant
website = "https://www.morningstarfunds.ie/ie/funds/snapshot/snapshot.aspx?id=F00000LLUO"
Set request = CreateObject("MSXML2.XMLHTTP")
request.Open "GET", website, False
request.setRequestHeader "If-Modified-Since", "Mon, 14 Nov 2022 00:00:00 GMT"
request.send
response = StrConv(request.responseBody, vbUnicode)
html.body.innerHTML = response
total = html.getElementsByClassName("line text")(0).innerText
MsgBox total
End Sub