Hallo,
kann mir jemand helfen? Ich möchte eine einzige Zahl via VBA aus dieser Website auslesen und im Excel speichern. https://edition.cnn.com/markets/fear-and-greed?utm_source=business_ribbon.
Der Code den mir BING vorschlägt funktioniert nicht. Vielen Dank
Sub FearAndGreedIndex()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = False
ie.navigate "https://edition.cnn.com/markets/fear-and-greed"
Do While ie.Busy Or ie.readyState > 4
DoEvents
Loop
Dim htmlDoc As Object
Set htmlDoc = ie.document
Dim elements As Object
Set elements = htmlDoc.getElementsByTagName("span")
Dim element As Object
For Each element In elements
If element.className = "FearGreed-heading" Then
Range("A1").Value = element.innerText
Exit For
End If
Next element
ie.Quit
End Sub