how to get for each state, the related image, and store all in c:\mydir
tks
My poor code for loop in cell of table:
Code:
Option Explicit
Sub test()
Dim oDom As Object: Set oDom = CreateObject("htmlFile")
Dim X As Long, Y As Long
Dim oRow As Object, oCell As Object
Dim data() As Variant
Y = 1: X = 1
With CreateObject("msxml2.xmlhttp")
.Open "GET", "[URL unfurl="true"]https://www.comuniecitta.it/prefissi-internazionali",[/URL] False
.Send
oDom.body.innerHtml = .responseText
End With
With oDom.getElementsByTagName("table")(0)
ReDim data(1 To .Rows.Length, 1 To .Rows(1).Cells.Length)
For Each oRow In .Rows
For Each oCell In oRow.Cells
data(X, Y) = Trim(oCell.innerText)
Debug.Print oCell.innerText
Y = Y + 1
Next oCell
Y = 1
X = X + 1
Next oRow
End With
End Sub