All right, here's the code, only the very end is important. Since I'm not able to find the input field the MsgBox doesn't bring any result
Sub betdreisechsfuenf()
Dim bethomepage As String
Dim ie2 As Object
Dim ele As Object
Set ie2 = CreateObject("InternetExplorer.Application")
Dim p As Integer
Dim o As Integer
bethomepage = "https://www.bet365.com/?&cb=105802124407#/HO/"
ie2.navigate bethomepage
ie2.Visible = True
Do While ie2.Busy And Not ie2.readyState = 4
DoEvents
Loop
DoEvents
Set HTMLDoc = ie2.Document
Set Items = HTMLDoc.all
Application.Wait Now + TimeSerial(0, 0, 2)
Application.StatusBar = "Suche Fußball"
For Each ele In ie2.Document.getElementsByClassName("wn-Classification_FavIcon ")
If InStr(ele.ParentElement.textContent, "Fußball") > 0 Then
ele.ParentElement.Click
End If
Next
AlleSpiele:
For Each Item In Items
Set QFields = Item.all
For Each QField In QFields
Application.StatusBar = "Suche Liga"
If InStr(QField.outerHTML, "Dänemark") > 0 And InStr(QField.className, "sm-Market_HeaderClosed ") > 0 Then
QField.Click
GoTo Ligaauswahl
End If
Next QField
Next Item
Ligaauswahl:
For Each Item In Items
Set QFields = Item.all
For Each QField In QFields
Application.StatusBar = "Suche Liga"
If InStr(QField.outerHTML, "Dänemark - Superligaen") > 0 Then
QField.Click
p = p + 1
If p < 2 Then
GoTo Ligaauswahl
End If
End If
Next QField
Next Item
Spiel:
For Each Item In Items
Set QFields = Item.all
For Each QField In QFields
Application.StatusBar = "Suche Wettart"
If InStr(QField.className, "cm-CouponMarketGroup_ChangeMarket ") > 0 Then
QField.Click
GoTo Wettartüber
End If
Next QField
Next Item
p = 1
Wettartüber:
For Each Item In Items
Set QFields = Item.all
For Each QField In QFields
Application.StatusBar = "Suche Wettart"
If InStr(QField.outerHTML, "Tore mehr als/weniger als") > 0 And InStr(QField.className, "wl-DropDownItem") > 0 Then
QField.Click
GoTo Spielauswahl
p = p + 1
If p < 2 Then
GoTo Wettartüber
End If
End If
Next QField
Next Item
Spielauswahl:
p = 1
Application.Wait Now + TimeSerial(0, 0, 2)
For Each ele In ie2.Document.getElementsByClassName("sl-CouponParticipantWithBookCloses_NameContainer ")
Worksheets("Polen").Range("B" & p).Value = ele.textContent
p = p + 1
Next
p = 1
Application.Wait Now + TimeSerial(0, 0, 2)
For Each ele In ie2.Document.getElementsByClassName("gl-ParticipantOddsOnly_Odds")
If Worksheets("Polen").Range("B" & p).Value <> "" Then
Worksheets("Polen").Range("C" & p).Value = ele.textContent
Else
Worksheets("Polen").Range("D" & p - 8).Value = ele.textContent
End If
If p = 1 Or p = 3 Or p = 8 Then
ele.Click
Application.Wait Now + TimeSerial(0, 0, 2)
GoTo Partie:
End If
p = p + 1
Next
Partie:
For Each ele In ie2.Document.getElementsByClassName("stk bs-Stake_TextBox")
MsgBox ele.textContent
Next
End Sub
Thanks for any ideas.
Michael