Hello,
Please can you check why attached macro not work in all websites to get social websites.
Ex: https://www.myonlinetraininghub.com/
https://www.maximintegrated.com/
Thanks;
Marsil
Use Debug.Print to see the response, after the line:
HTML.body.innerHTML = http.responseText
Debug.Print http.responseText
You'll have an idea of what the site returns.
Hi Catalin,
How kind you are to help me. thank you.
I added " Debug.Print http.responseText " after this line " HTML.body.innerHTML = http.responseText "
but still face the macro no result for https://www.myonlinetraininghub.com/ and https://www.maximintegrated.com/
Please can you review code for attached macro.
Grateful for your support...
Thanks;
Marsil
Have you studied the printed response from those websites?
Try another method:
Dim appIE As Object, itm As Variant
Dim objCollection As Object
Dim i As Long, LastRow As Long
Dim sURL As String
LastRow = Range("A" & Rows.Count).End(xlUp).row
For i = 24 To LastRow
Set appIE = New InternetExplorer
sURL = Range("A" & i).Value
With appIE
.navigate sURL
.Visible = True
End With
On Error GoTo 1
Do While appIE.Busy Or appIE.readyState <> READYSTATE_COMPLETE
DoEvents
Loop
Set objCollection = appIE.document.getElementsByTagName("a")
For Each itm In objCollection
Debug.Print itm.innerText
Next itm
appIE.Quit
Set appIE = Nothing
2:
Next i
Exit Sub
1:
Resume 2
End Sub
Hi Catalin,
That's a huge help - thanks!
Unfortunately, I confused and macro doesn't work, please can you update this code in excel file and resend it.
Thank you very much; your support is greatly appreciated.
Thanks;
Marsil
File attached.