
sei stato veloce nella risposta, paziente con chi (come me) non capisce nulla di VB e VBA ed assolutamente chiaro.
Funziona benissimo!!!
Veramente, un sincero GRAZIE DI CUORE.
Moderatori: Anthony47, Flash30005
La procedura prevede che sia stato creatoun file con una webquery, su cui avrebbe agito la macro; pubblica il file completo e vedremo.
Per come allegare un file guarda qui: viewtopic.php?f=26&t=103893&p=605487#p605487
Set myRan = Range(Cells(Rows.Count, "C").End(xlUp).Offset(0, -2), Range("E2"))
Sub getTables22()
'versione http://www.pc-facile.com/forum/viewtopic.php?f=26&t=100356&start=20#p644186
Dim Dest As String, myRoot As String, I As Long, myRan As Range
'
Dest = "Foglio2" '<< Il foglio dove sara' creato l' elenco
With Range("A1").QueryTable
On Error GoTo Err1
For I = 1 To 5000000
.Connection = "URL;http://cercalatuascuola.istruzione.it/cercalatuascuola/ricerca/risultati?page=" & I & "&codiceRegione=&codiceOrdine=&checkStatale=S&radioBiennioTriennio=Biennio&denominazione=&codMecc=&tipoRicerca=AVANZATA&idform=result-453463"
.Refresh BackgroundQuery:=False
If Cells(Rows.Count, "B").End(xlUp) = Sheets(Dest).Cells(Rows.Count, "B").End(xlUp) Then Exit For
'' Set myRan = Range(Cells(Rows.Count, "C").End(xlUp).Offset(0, -2), Range("E1").End(xlDown).Offset(1, 0))
Set myRan = Range(Cells(Rows.Count, "C").End(xlUp).Offset(0, -2), Range("E2"))
If myRan.Rows.Count <= 10 And myRan.Rows.Count > 0 Then
myRan.Copy Destination:=Sheets(Dest).Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Else
Exit For
End If
boH:
DoEvents
[J1] = I
[K1] = Sheets(Dest).Cells(Rows.Count, 1).End(xlUp).Row
Next I
'' Debug.Print I
End With
GoTo exiA
Err1:
Debug.Print "Errore: " & I, Now, [K1]
Resume boH
'
exiA:
MsgBox ("Completato...")
'
End Sub
Torna a Applicazioni Office Windows
confrontare e evidenziare 2 fogli excel Autore: niccia |
Forum: Applicazioni Office Windows Risposte: 5 |
[EXCEL] controllo corrispondenza tra valori con un vincolo Autore: sbs |
Forum: Applicazioni Office Windows Risposte: 9 |
Come impostare il formato data predefinito in excel? Autore: wallace&gromit |
Forum: Applicazioni Office Windows Risposte: 5 |
Visitano il forum: Nessuno e 93 ospiti