i usse this code to get value from a table Italy population history:
Private Sub FILL_TABELLA_ANNI()
Dim ODOM As HTMLDocument
Set ODOM = CreateObject("htmlFile")
Dim X As Long
Dim ANNO As String, POPZ As String, PERC As String
SQL = "DELETE * FROM TABELLA_ANNI"
CON.Execute (SQL)
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", " False
.send
ODOM.body.innerHTML = .responseText
End With
With ODOM.getElementsByClassName("years")
With .Item(1).getElementsByTagName("tr")
For X = 1 To .Length - 1
ANNO = .Item(X).cells(0).innerText
POPZ = Replace(.Item(X).cells(1).innerText, ",", ".")
PERC = .Item(X).cells(2).innerText
SQL = "INSERT INTO TABELLA_ANNI(ANNO, POPOLAZ, PERC) VALUES ('" & ANNO & "', '" & POPZ & "', '" & PERC & "')"
CON.Execute (SQL)
Next X
End With
End With
End Sub
now i need to get also the value from the table Population projection (2020-2100)
Private Sub FILL_TABELLA_ANNI()
Dim ODOM As HTMLDocument
Set ODOM = CreateObject("htmlFile")
Dim X As Long
Dim ANNO As String, POPZ As String, PERC As String
SQL = "DELETE * FROM TABELLA_ANNI"
CON.Execute (SQL)
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", " False
.send
ODOM.body.innerHTML = .responseText
End With
With ODOM.getElementsByClassName("years")
With .Item(1).getElementsByTagName("tr")
For X = 1 To .Length - 1
ANNO = .Item(X).cells(0).innerText
POPZ = Replace(.Item(X).cells(1).innerText, ",", ".")
PERC = .Item(X).cells(2).innerText
SQL = "INSERT INTO TABELLA_ANNI(ANNO, POPOLAZ, PERC) VALUES ('" & ANNO & "', '" & POPZ & "', '" & PERC & "')"
CON.Execute (SQL)
Next X
End With
End With
End Sub
now i need to get also the value from the table Population projection (2020-2100)