http request truncates the data
When I run this (after setting the references) I only get the data for the 1870's)
Ive tried other methods async and the IE object but always get the same reduced data set.
Im stumped. Maybe this site restrict data access or something?
Private Sub cmdHTTP_Click()
Dim xmlhttp As New MSXML2.ServerXMLHTTP60
Dim myurl As String
myurl = "https://www.multpl.com/s-p-500-pe-ratio/table/by-year"
xmlhttp.Open "GET", myurl, False
xmlhttp.send
Application.Wait Now + TimeValue("00:00:10")
Do While xmlhttp.readyState <> 4
DoEvents
Loop
Debug.Print xmlhttp.responseText
End Sub
Last edited by bronc; 07-18-2021 at 03:04 PM.
Reason: oops
|