The second MsgBox in the following code displays "TypeName = Empty", even though the first MsgBox displays the HTMLText text.
Len(HTMLText) displays blank.
How do I access the text in HTMLText?
Thank you.
Dim HTMLText
Dim xmlhttp ' As MSXML2.XMLHTTP.3.0
Set xmlhttp = CreateObject("MSXML2.XMLHTTP.3.0")
xmlhttp.open "GET", myURL, False
xmlhttp.Send
If (xmlhttp.readyState = 4) Then
If (xmlhttp.status = 200) Then
HTMLText = xmlhttp.responseText
MsgBox "xmlhttp was successful. HTMLText = " & HTMLText, vbOKOnly, "note"
MsgBox "TypeName = " & TypeName(HTMLText), vbOKOnly, "note"