Public Function gInfoPE(Boerse As String, Ticker As String) As Double Dim TextRueckgabeString As String Dim SuchTextPosition As Double Dim SuchText As String Dim CompanyId As String Dim XML On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://finance.google.com/finance?q=" & Boerse & ":" & Ticker, False XML.send TextRueckgabeString = XML.responsetext TextRueckgabeString = Split(TextRueckgabeString, "snap-panel-and-plusone")(1) TextRueckgabeString = Split(TextRueckgabeString, "P/E")(1) TextRueckgabeString = Split(TextRueckgabeString, ">")(2) TextRueckgabeString = Left(TextRueckgabeString, InStr(TextRueckgabeString, "<") - 1) TextRueckgabeString = Replace(TextRueckgabeString, ".", ",") gInfoPE = CDbl(TextRueckgabeString) 'Set XML = Nothing Exit Function Fehler: gInfoPE = 0 Set XML = Nothing End Function Public Function gInfoMC(Boerse As String, Ticker As String) As Variant Dim TextRueckgabeString As String Dim SuchTextPosition As Double Dim SuchText As String Dim CompanyId As String Dim XML On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://finance.google.com/finance?q=" & Boerse & ":" & Ticker, False XML.send TextRueckgabeString = XML.responsetext TextRueckgabeString = Split(TextRueckgabeString, "snap-panel-and-plusone")(1) TextRueckgabeString = Split(TextRueckgabeString, "Mkt cap")(1) TextRueckgabeString = Split(TextRueckgabeString, ">")(2) TextRueckgabeString = Left(TextRueckgabeString, InStr(TextRueckgabeString, "<") - 3) + Mid(TextRueckgabeString, InStr(1, TextRueckgabeString, ".") + 3, 1) TextRueckgabeString = Replace(TextRueckgabeString, ".", ",") gInfoMC = TextRueckgabeString If IsNumeric(Left(gInfoMC, 1)) = False Then gInfoMC = 0 'gInfoMC = CDbl(TextRueckgabeString) 'Set XML = Nothing Exit Function Fehler: gInfoMC = 0 Set XML = Nothing End Function Public Function gInfoDiv(Boerse As String, Ticker As String) As Double Dim TextRueckgabeString As String Dim SuchTextPosition As Double Dim SuchText As String Dim CompanyId As String Dim XML On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://finance.google.com/finance?q=" & Boerse & ":" & Ticker, False XML.send TextRueckgabeString = XML.responsetext TextRueckgabeString = Split(TextRueckgabeString, "snap-panel-and-plusone")(1) TextRueckgabeString = Split(TextRueckgabeString, "Div/yield")(1) TextRueckgabeString = Split(TextRueckgabeString, ">")(2) TextRueckgabeString = Left(TextRueckgabeString, InStr(TextRueckgabeString, "/") - 1) TextRueckgabeString = Replace(TextRueckgabeString, ".", ",") gInfoDiv = CDbl(TextRueckgabeString) 'Set XML = Nothing Exit Function Fehler: gInfoDiv = 0 Set XML = Nothing End Function Public Function gInfoYield(Boerse As String, Ticker As String) As Double Dim TextRueckgabeString As String Dim SuchTextPosition As Double Dim SuchText As String Dim CompanyId As String Dim XML On Error GoTo Fehler Set XML = CreateObject("MSXML2.ServerXMLHTTP") XML.Open "GET", "https://finance.google.com/finance?q=" & Boerse & ":" & Ticker, False XML.send TextRueckgabeString = XML.responsetext TextRueckgabeString = Split(TextRueckgabeString, "snap-panel-and-plusone")(1) TextRueckgabeString = Split(TextRueckgabeString, "Div/yield")(1) TextRueckgabeString = Split(TextRueckgabeString, "/")(2) TextRueckgabeString = Left(TextRueckgabeString, InStr(TextRueckgabeString, "<") - 2) TextRueckgabeString = Replace(TextRueckgabeString, ".", ",") gInfoYield = CDbl(TextRueckgabeString) 'Set XML = Nothing Exit Function Fehler: gInfoYield = 0 Set XML = Nothing End Function