how to populate a site field using excel vba

Asked

Viewed 281 times

0

I would like to know how to fill the field.

I have tried several combinations to fill the highlighted textbox in the photo, but nothing works.

I tried things like:

IE.document.all("stk bs-Stake_TextBox").innerText = 1

IE.document.getElementsByClassName("stk bs-Stake_TextBox").Value = "5"

IE.document.getElementsByClassName("bs-Stake").Focus

code I have so far:

Sub CliqueEmBotaoBet365()

    Dim IE As New SHDocVw.InternetExplorer
    Dim oSelect As HTMLInputButtonElement
    IE.Visible = True

    'O ideal é que a pessoa pare o codigo aqui e navege manualmente, pois a bet365 nao vavega direito
    IE.navigate "https://www.bet365.com/#/AVR/B144/"

    Do While IE.readyState <> READYSTATE_COMPLETE
    Loop

    Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 5)

    'Selecionar o 5º mercado dos esportes virtuais(Quando eu ja estava na pagina dos virtuais)
    IE.document.getElementsByClassName("vr-VirtualsNavBarButton_Label ")(4).Click

    'Seleciona a odd do 1º corredor
    IE.document.getElementsByClassName("vr-ParticipantVirtualOddsOnly_Odds")(0).Click

    'DEVERIA COLOCAR A APOSTA, MAS NAO FUNCIOBA
    IE.document.getElementsByClassName("bs-Stake") = "5"

'    IE.Quit
'    Set IE = Nothing

End Sub

1 answer

0

Clebson would it be possible to put the link of the site in question? Or try

IE.document.all.Item("stk bs-Stake_TextBox").Value = "<valor desejado>"
  • It says: The object variable or the block variable 'with' has not been defined the site is: https://www.bet365.com/#/AVR/B144/

  • Send code ok?

  • The code is very basic and still has flaws, such as browsing to the site... Even so I put it up there. Only ta badly formatted because I don’t know how to format here.

  • So no problems, good takes out one more question you want me to help in a complete way, since access the site with login/ password and then process the data? I do it without problems but let’s talk ok?

  • Okay... at first I just wanted to place the bet, but if you have the time and willingness to help me with the rest, I won’t refuse. It took me a long time to click a simple button.

  • I help yes, no problem. I will register and see how the screens are after.

  • we can exchange Whatsapp number here?

  • I don’t know but my email is auto [email protected], then we trade for it or chat via skype

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.