I'm trying to download a site's table: " link , and I've already" got it ". But there's a problem with my code. I want the user to set the team. This is done by selecting in a combo box on the site, well, I even change the combo box data, however the table is not updated.
Below the code for you to see what I'm talking about.
Sub navega_cartola_fc()
Dim ie As Object
Dim Nome As String
Set ie = New InternetExplorer
Nome = "Botafogo"
ie.navigate "http://www.scoutscartola.com/mercado"
ie.Visible = True
While ie.Busy: Wend
For Each obj In ie.Document.all.Item("data[filtro_time]")
If obj.innerText = Nome Then
obj.Selected = True
End If
Next obj
Dim r, c As Integer
Dim elemCol As Object
Set elemCol = ie.Document.getElementsByTagName("tbody")
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
For r = 0 To elemCol(0).Rows.Length - 1
For c = 0 To elemCol(0).Rows(r).Cells.Length - 1
ActiveSheet.Cells(r + 1, c + 1) = elemCol(0).Rows(r).Cells(c).innerText
Next c
Next r
After correctly activating this combo box, excel should also change another combo box at the bottom of the site (one that says how many players you want to filter, since this one comes by default 25 and I would like for at least 100 not to run the risk of getting player out of the search) ...
Would anyone know what to do in this case? For all the materials I see, the person changes the combo box just like I did, but there is a button on the site itself that "updates" the data. But in my case there is no update button, the update is made as soon as the team is selected in the combo box - by the site - and this does not happen when I do the vba.