• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Fetch data from Company URL

Pushker123

New Member
I have a Company website URL in the excel sheet 01, when i copy and paste 1 company URL name(example http://www.06sogutma.com) into excel sheet 02 and RUN MACRO/Click Enter, the following field must automatically fetch contact number, Fax number from the website and populate into excel sheet 02.

Grateful if anyone can help me with the logic as i am new to VBA.

thanks
Pushker
 
Try this code
Code:
Sub Demo()
    With CreateObject("WinHttp.WinHttpRequest.5.1")
        .Open "GET", "https://06sogutma.com/", False
        .setRequestHeader "DNT", "1"
        On Error Resume Next
        .send
        Debug.Print "Phone: " & Trim(Split(Split(.responseText, """>Tel")(1), "<")(0))
        Debug.Print "Fax: " & Trim(Replace(Split(Split(.responseText, "Fax:")(1), "</p")(0), "</b>", ""))
        Debug.Print "E-Mail: " & Split(Split(.responseText, "a href=""mailto:")(1), """>")(0)
    End With
End Sub
 
Last edited:
Hi Yasser

Thanks for you reply

But i am not able print the Phone, fax & email in excel sheet.

Can you please help me out?

Thanks
Pushker
 
Back
Top