Moderatori: Anthony47, Flash30005
Sub GetTabbb()
'
myUrl = "http://www.oddsdropping.com/index.php/en/"
Set ie = CreateObject("InternetExplorer.Application")
With ie
.navigate myUrl
.Visible = True
Do While .Busy: DoEvents: Loop 'Attesa not busy
Do While .readyState <> 4: DoEvents: Loop 'Attesa documento
End With
'
myStart = Timer 'attesa addizionale
Do
DoEvents
If Timer > myStart + 1 Or Timer < myStart Then Exit Do
Loop
'Leggi le tabelle, su un nuovo foglio
Worksheets.Add '<<< Vedi testo
Cells.Clear
Set myColl = ie.document.getElementsByTagName("TABLE")
If myColl.Length < 5 Then
MsgBox ("Numero anomalo di tabelle, abortito")
GoTo IEQuit
End If
With myColl(4)
For Each trtr In .Rows
For Each tdtd In trtr.Cells
Cells(I + 1, J + 1) = tdtd.innertext
Cells(I + 1, 1).Select
J = J + 1
Next tdtd
I = I + 1: J = 0
Next trtr
I = I + 2
'Next myItm
End With
'Next II
Stop 'Vedi testo
IEQuit:
'Chiusura IE
ie.Quit
Set ie = Nothing
End Sub
Cells.Clear
Stop '<<< Questo, in questa posizione
Set myColl = ie.document.getElementsByTagName("TABLE")
Sub Macro8()
'
'
myUrl = "http://betvirus.com/leagueTables/67154/"
Set ie = CreateObject("InternetExplorer.Application")
With ie
.navigate myUrl
.Visible = True
Do While .Busy: DoEvents: Loop 'Attesa not busy
Do While .readyState <> 4: DoEvents: Loop 'Attesa documento
End With
'
myStart = Timer 'attesa addizionale
Do
DoEvents
If Timer > myStart + 1 Or Timer < myStart Then Exit Do
Loop
'Leggi le tabelle, su un nuovo foglio
Worksheets.Add '<<< Vedi testo
Cells.Clear
Set myColl = ie.document.getElementsByTagName("TABLE")
If myColl.Length < 5 Then
MsgBox ("Numero anomalo di tabelle, abortito")
GoTo IEQuit
End If
With myColl(4)
For Each trtr In .Rows
For Each tdtd In trtr.Cells
Cells(I + 1, J + 1) = tdtd.innertext
Cells(I + 1, 1).Select
J = J + 1
Next tdtd
I = I + 1: J = 0
Next trtr
I = I + 2
'Next myItm
End With
'Next II
SendKeys "{F5}", True
SendKeys "{ENTER}", True
IEQuit:
'Chiusura IE
ie.Quit
Set ie = Nothing
End Sub
Sub Macro1()
myUrl = "http://betvirus.com/leagueTables/67154/"
Set ie = CreateObject("InternetExplorer.Application")
With ie
.navigate myUrl
.Visible = True
Do While .Busy: DoEvents: Loop 'Attesa not busy
Do While .readyState <> 4: DoEvents: Loop 'Attesa documento
End With
'
myStart = Timer 'attesa addizionale
Do
DoEvents
If Timer > myStart + 1 Or Timer < myStart Then Exit Do
Loop
'Leggi le tabelle, su un nuovo foglio
Sheets("prova").Select '<<< Vedi testo
Cells.Clear
Set myColl = ie.document.getElementsByTagName("TABLE")
If myColl.Length < 5 Then
MsgBox ("Numero anomalo di tabelle, abortito")
GoTo IEQuit
End If
With myColl(4)
For Each trtr In .Rows
For Each tdtd In trtr.Cells
Cells(I + 1, J + 1) = tdtd.innertext
Cells(I + 1, 1).Select
J = J + 1
Next tdtd
I = I + 1: J = 0
Next trtr
I = I + 2
'Next myItm
End With
'Next II
SendKeys "{F5}", True
SendKeys "{ENTER}", True
IEQuit:
'Chiusura IE
ie.Quit
Set ie = Nothing
End Sub
Sub Macro2()
myUrl = "http://betvirus.com/leagueTables/67154/"
Set ie = CreateObject("InternetExplorer.Application")
With ie
.navigate myUrl
.Visible = True
Do While .Busy: DoEvents: Loop 'Attesa not busy
Do While .readyState <> 4: DoEvents: Loop 'Attesa documento
End With
'
myStart = Timer 'attesa addizionale
Do
DoEvents
If Timer > myStart + 1 Or Timer < myStart Then Exit Do
Loop
'Leggi le tabelle su FoglioXX
Sheets("FOGLIO3").Select '<<< Vedi testo
Cells.ClearContents
Set myColl = ie.document.getElementsByTagName("TABLE")
For Each myItm In myColl
For Each trtr In myItm.Rows
For Each tdtd In trtr.Cells
Cells(I + 1, J + 1) = tdtd.innertext
Cells(I + 1, 1).Select
J = J + 1
Next tdtd
I = I + 1: J = 0
Next trtr
I = I + 2
Next myItm
'SendKeys "{F5}", True
' SendKeys "{ENTER}", True
IEQuit:
'Chiusura IE
ie.Quit
Set ie = Nothing
End Sub
Set myColl = ie.document.getElementsByTagName("TABLE")
With myColl(4)
For Each trtr In .Rows
'...
End With
Set myColl = ie.document.getElementsByTagName("TABLE")
For Each myItm In myColl
For Each trtr In myItm.Rows
'...
Next myItm
Sub Macro1()
myUrl = "http://betvirus.com/leagueTables/67154/"
Set ie = CreateObject("InternetExplorer.Application")
With ie
.navigate myUrl
.Visible = True
Do While .Busy: DoEvents: Loop 'Attesa not busy
Do While .readyState <> 4: DoEvents: Loop 'Attesa documento
End With
'
myStart = Timer 'attesa addizionale
Do
DoEvents
If Timer > myStart + 1 Or Timer < myStart Then Exit Do
Loop
'Leggi le tabelle, su FoglioXX
Sheets("prova").Select '<<< Vedi testo
Cells.ClearContents
Set myColl = ie.document.getElementsByTagName("TABLE")
If myColl.Length < 5 Then
MsgBox ("Numero anomalo di tabelle, abortito")
GoTo IEQuit
End If
With myColl(1)
For Each trtr In .Rows
For Each tdtd In trtr.Cells
Cells(I + 1, J + 1) = tdtd.innertext
Cells(I + 1, 1).Select
J = J + 1
Next tdtd
I = I + 1: J = 0
Next trtr
I = I + 2
Set myColl = ie.document.getElementsByTagName("TABLE")
If myColl.Length < 5 Then
MsgBox ("Numero anomalo di tabelle, abortito")
GoTo IEQuit
End If
With myColl(7)
For Each trtr In .Rows
For Each tdtd In trtr.Cells
Cells(I + 1, J + 1) = tdtd.innertext
Cells(I + 1, 1).Select
J = J + 1
Next tdtd
I = I + 1: J = 0
Next trtr
I = I + 2
'Next myItm
End With
'Next II
SendKeys "{F5}", True
SendKeys "{ENTER}", True
IEQuit:
'Chiusura IE
ie.Quit
Set ie = Nothing
End With
End Sub
Sub Macro11()
myUrl = "http://betvirus.com/leagueTables/67154/"
Set ie = CreateObject("InternetExplorer.Application")
With ie
.navigate myUrl
.Visible = True
Do While .Busy: DoEvents: Loop 'Attesa not busy
Do While .readyState <> 4: DoEvents: Loop 'Attesa documento
End With
'
myStart = Timer 'attesa addizionale
Do
DoEvents
If Timer > myStart + 1 Or Timer < myStart Then Exit Do
Loop
'Leggi le tabelle, su FoglioXX
Sheets("prova").Select '<<< Vedi testo
Cells.ClearContents
Set myColl = ie.document.getElementsByTagName("TABLE")
If myColl.Length < 7 Then
MsgBox ("Numero anomalo di tabelle, abortito")
GoTo IEQuit
End If
For JJ = 1 To 7 Step 6
With myColl(JJ)
For Each trtr In .Rows
For Each tdtd In trtr.Cells
Cells(I + 1, J + 1) = tdtd.innertext
Cells(I + 1, 1).Select
J = J + 1
Next tdtd
I = I + 1: J = 0
Next trtr
I = I + 2
End With
Next JJ
' End With
SendKeys "{F5}", True
SendKeys "{ENTER}", True
IEQuit:
'Chiusura IE
ie.Quit
Set ie = Nothing
' End With
End Sub
'Leggi le tabelle, su FoglioXX
Sheets("prova").Select
Cells.ClearContents
Cells.NumberFormat = "@" '<<< QUESTA, qui
Torna a Applicazioni Office Windows
Visitano il forum: Nessuno e 18 ospiti