Option Explicit
Sub prova()
Const URL As String = " Dim IE As New InternetExplorer, oHtml As HTMLDocument, post As Object, R&
With IE
.Visible = True
.Navigate URL
Do While .Busy: DoEvents: Loop
While .Busy Or .ReadyState < 4: DoEvents: Wend
Set oHtml = .Document
End With
For Each post In oHtml.getElementsByTagName("OPTION")
Debug.Print post.innerText
Next
End Sub
Based this code(strongm), i get only the part of item of dropdown, for example:
...
Ca'D'andrea (Lombardia)
Cabella Ligure (Piemonte)
Cabiate (Lombardia)
Cabras (Sardegna)
Caccamo (Sicilia)
Caccuri (Calabria)
Cadegliano-viconago (Lombardia)
Cadelbosco di Sopra (Emilia-Romagna)
Cadeo (Emilia-Romagna)
Caderzone Terme (Trentino-Alto Adige)
...
But i need to get also a part of http url, for example:
"/ita/piemonte/baceno.html"
"/ita/campania/bacoli.html"
"/ita/liguria/badalucco.html"
"/ita/sardegna/badesi.html"
...
eccc...
Sub prova()
Const URL As String = " Dim IE As New InternetExplorer, oHtml As HTMLDocument, post As Object, R&
With IE
.Visible = True
.Navigate URL
Do While .Busy: DoEvents: Loop
While .Busy Or .ReadyState < 4: DoEvents: Wend
Set oHtml = .Document
End With
For Each post In oHtml.getElementsByTagName("OPTION")
Debug.Print post.innerText
Next
End Sub
Based this code(strongm), i get only the part of item of dropdown, for example:
...
Ca'D'andrea (Lombardia)
Cabella Ligure (Piemonte)
Cabiate (Lombardia)
Cabras (Sardegna)
Caccamo (Sicilia)
Caccuri (Calabria)
Cadegliano-viconago (Lombardia)
Cadelbosco di Sopra (Emilia-Romagna)
Cadeo (Emilia-Romagna)
Caderzone Terme (Trentino-Alto Adige)
...
But i need to get also a part of http url, for example:
"/ita/piemonte/baceno.html"
"/ita/campania/bacoli.html"
"/ita/liguria/badalucco.html"
"/ita/sardegna/badesi.html"
...
eccc...