Fermo restando che le due soluzioni vanno benissimo, ho provato ho copiato l'ultima di Anthony con la formattazione di flash.
Il risultato è come da immagine acclusa (non posso usare postimage.org), da sistemare nella formattazione, e restituisce il messaggio di errore
[url]<a href="http://image.forumfree.it/8/2/5/0/3/1/3/1461825549.jpg" target="_blank"><img src="http://image.forumfree.it/8/2/5/0/3/1/3/t/1461825549.jpg" alt="file errore"></a>[/url]
[img]<a%20href="http://image.forumfree.it/8/2/5/0/3/1/3/1461825549.jpg"%20target="_blank"><img%20src="http://image.forumfree.it/8/2/5/0/3/1/3/t/1461825549.jpg"%20alt="file%20errore"></a>[/img]
<a href="http://image.forumfree.it/8/2/5/0/3/1/3/1461825549.jpg" target="_blank"><img src="http://image.forumfree.it/8/2/5/0/3/1/3/t/1461825549.jpg" alt="file errore"></a>
- Codice: Seleziona tutto
Sub GetProsoccEu()
'
myUrl = "http://www.prosoccer.eu/football/" '<<<<
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 + 2 Or Timer < myStart Then Exit Do
Loop
Set myColl = IE.document.getElementById("thetable")
Set my2coll = myColl.getElementsByTagName("span")
For Each myspan In my2coll
DoEvents
If myspan.className = "comp" Then i = i + 1: J = 0
If Left(myspan.className, 5) <> "" Then
Cells(i, J + 1).Value = myspan.innerText
J = J + 1
End If
Next myspan
'Stop 'Vedi testo
'
'Chiusura IE
IE.Quit
Set IE = Nothing
Formatta
End Sub
Private Sub Formatta()
Rows("1:1").Insert Shift:=xlDown
Range("A1") = "Camp"
Range("C1") = "Ora"
Range("D1") = "Casa"
Range("F1") = "FuoriC"
Range("G1") = "Tip"
Range("H1") = "'%1"
Range("I1") = "'%X"
Range("J1") = "'%2"
Range("K1") = "Q1"
Range("L1") = "Q1"
Range("M1") = "QX"
Range("N1") = "Q2"
Range("K1") = "Qtip"
Range("O1") = "%U"
Range("Q1") = "%O"
Range("R1") = "QU/O"
Range("R1") = "QU"
Range("T1") = "QO"
Range("V1") = "RisEsP"
Range("W1") = "RisEs??"
Range("Z1") = "RisFin"
Range("B:B,P:P,S:S,U:U,X:Y").Delete Shift:=xlToLeft
Columns("F:T").HorizontalAlignment = xlRight
Cells.EntireColumn.AutoFit
ColFin = 10092390
UR = Range("T" & Rows.Count).End(xlUp).Row
For RR = 2 To UR
Range("T" & RR).Value = "'" & Trim(Range("T" & RR).Value)
Range("B" & RR).Value = Format(DateAdd("h", -1, Range("B" & RR).Value), "hh:mm")
If Range("T" & RR).Value <> "" Then
Range("T" & RR).Interior.Color = 52479
RisFinale = Range("T" & RR).Value
RisFR1 = Trim(Mid(RisFinale, InStr(RisFinale, "-") + 1, Len(RisFinale)))
RisFR2 = Trim(Mid(RisFinale, 1, InStr(RisFinale, "-") - 1))
SRis = Val(RisFR1) + Val(RisFR1)
If RisFinale = Trim(Range("R" & RR).Value) Then Range("R" & RR).Interior.Color = ColFin
If RisFinale = Trim(Range("S" & RR).Value) Then Range("S" & RR).Interior.Color = ColFin
If RisFR1 = RisFR2 Then
If Range("F" & RR).Value Like "*X*" Then Range("F" & RR).Interior.Color = ColFin
Range("H" & RR).Interior.Color = ColFin
Range("L" & RR).Interior.Color = ColFin
GoTo saltaRF
End If
If RisFR1 > RisFR2 Then
If Range("F" & RR).Value Like "1*" Then Range("F" & RR).Interior.Color = ColFin
Range("G" & RR).Interior.Color = ColFin
Range("K" & RR).Interior.Color = ColFin
Else
If Range("F" & RR).Value Like "*2" Then Range("F" & RR).Interior.Color = ColFin
Range("I" & RR).Interior.Color = ColFin
Range("M" & RR).Interior.Color = ColFin
End If
saltaRF:
If SRis > 2 Then
Range("O" & RR).Interior.Color = ColFin
Range("Q" & RR).Interior.Color = ColFin
Else
Range("N" & RR).Interior.Color = ColFin
Range("P" & RR).Interior.Color = ColFin
End If
End If
Next RR
End Sub