Public Function YahooData(Ticker As String, Kennzahl As String) As Double Dim XML As Object Dim DataString As String On Error GoTo Fehler Kennzahl = Kennzahl & """" Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://query1.finance.yahoo.com/v7/finance/quote?symbols=" & Ticker, False XML.send DataString = XML.responsetext DataString = Split(DataString, Kennzahl)(1) DataString = Mid(DataString, 2, InStr(DataString, ",") - 2) DataString = Replace(DataString, ".", ",") 'für Datum und Zeit If Kennzahl = "regularMarketTime""" Then If Date >= DateSerial(Year(Date), 4, 0) And Date <= DateSerial(Year(Date), 11, 0) - Weekday(DateSerial(Year(Date), 11, 0)) + 1 Then DataString = DataString + 7200 Else DataString = DataString + 3600 DataString = (DataString / 86400) + 25569 End If YahooData = DataString Set XML = Nothing Exit Function Fehler: YahooData = 0 Set XML = Nothing End Function Public Function YahooText(Ticker As String, Kennzahl As String) As String Dim XML As Object Dim Text As String On Error GoTo Fehler Kennzahl = Kennzahl & """" Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://query1.finance.yahoo.com/v7/finance/quote?symbols=" & Ticker, False XML.send Text = XML.responsetext Text = Split(Text, Kennzahl)(1) If Kennzahl = "symbol""" Then Text = Mid(Text, 3, InStr(Text, "}") - 4) If Kennzahl = "market""" Then Text = Mid(Text, 2, InStr(Text, "_")) If InStr(Text, ",") Then Text = Mid(Text, 3, InStr(Text, ",") - 4) YahooText = Text Set XML = Nothing Exit Function Fehler: YahooText = "" Set XML = Nothing End Function