Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GET date from classname

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
222
IT
wath is incorrect from this code:

Option Explicit
Sub TEST()

Dim http As New XMLHTTP60, html As New HTMLDocument, DATA_AGG As String
Dim source As Object


With http
.Open "GET", " False
.send
html.body.innerHTML = .responseText
End With

DATA_AGG = Mid(html.Document.getElementsByClassName("uh")(1).innerText, 15, 10)

End Sub

i need to get date from the header of table Le 20 Regioni italiane, is approx to the and of page

 
If you look at HTMLDocument class in the Object Browser, even with hidden members displayed:
TT_im1_upfk9w.png

you can see that there is no 'Document' member for this class, so this should generate error.

[tt]Debug.Print html.getElementsByClassName("uh")(1).innerText[/tt] returns what you probably expect: fonte Istat - 01/01/2024[1]

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top