'Vergangener Jahresdividendenbetrag Public Function yDivV(Ticker As String) As Double Dim strResponse As String Dim XML As Object On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://de.finance.yahoo.com/quote/" & Ticker & "/key-statistics?", False XML.send strResponse = XML.ResponseText strResponse = Split(strResponse, "Jahresdividendensatz")(1) strResponse = Mid(strResponse, InStr(strResponse, "60px") + 7, 20) strResponse = Left(strResponse, InStr(strResponse, "<") - 1) yDivV = CDbl(strResponse) Set XML = Nothing Exit Function Fehler: yDivV = 0 Set XML = Nothing End Function 'Erwarteter Jahresdividendenbetrag Public Function yDivE(Ticker As String) As Double Dim strResponse As String Dim XML As Object On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://de.finance.yahoo.com/quote/" & Ticker & "/key-statistics?", False XML.send strResponse = XML.ResponseText strResponse = Split(strResponse, "Jahresdividendenrate")(1) strResponse = Mid(strResponse, InStr(strResponse, "60px") + 7, 20) strResponse = Left(strResponse, InStr(strResponse, "<") - 1) yDivE = CDbl(Replace(strResponse, ".", ",")) Set XML = Nothing Exit Function Fehler: yDivE = 0 Set XML = Nothing End Function 'vergangene Dividendenrendite Public Function yDivRV(Ticker As String) As Double Dim strResponse As String Dim XML As Object On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://de.finance.yahoo.com/quote/" & Ticker & "/key-statistics?", False XML.send strResponse = XML.ResponseText strResponse = Split(strResponse, "Jahresdividendenertrag")(2) strResponse = Mid(strResponse, InStr(strResponse, "60px") + 7, 20) strResponse = Left(strResponse, InStr(strResponse, "%") - 1) yDivRV = CDbl(strResponse) / 100 Set XML = Nothing Exit Function Fehler: yDivRV = 0 Set XML = Nothing End Function 'erwartete Dividendenrendite Public Function yDivRE(Ticker As String) As Double Dim strResponse As String Dim XML As Object On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://de.finance.yahoo.com/quote/" & Ticker & "/key-statistics?", False XML.send strResponse = XML.ResponseText strResponse = Split(strResponse, "Jahresdividendenertrag")(1) strResponse = Mid(strResponse, InStr(strResponse, "60px") + 7, 20) strResponse = Left(strResponse, InStr(strResponse, "%") - 1) yDivRE = CDbl(strResponse) / 100 Set XML = Nothing Exit Function Fehler: yDivRE = 0 Set XML = Nothing End Function