How to follow multiple links and extract data from webpage with VBA

  • Published on Sep 23, 2015
  • The following steps are accomplished with VBA:
    First start the Internet Explorer.
    Ensure the webpage has downloaded completely through error handling.
    Look for all the links in a webpage, compare with the link you want, click on it.
    Come to the destination page.
    We have also used a timer to navigate to a webpage.
    Find the start position for data extraction.
    Define the end position for data extraction.
    Using a text function, we get the exact data we want.
    Details available at:

Comments • 24

  • yatender singh
    yatender singh Month ago

    Thanks a lot sir, but sir if I want to get real time data in excel from website without changing properties of recorded macros (vba) how to do this pls help out sir

    • yatender singh
      yatender singh Month ago

      Thanks a lot sir
      If somebody want to take training of Vba frm U any procedure and place pls guide

    • Dinesh Kumar Takyar
      Dinesh Kumar Takyar  Month ago

      These links will help:
      You may also search my RU-clip channel or website:

  • Saurabh Srivastava
    Saurabh Srivastava 5 months ago

    sir capcha kese extract karte hai . email id ke sath aur web scracping ke sath vba mai automatic mail kese open karte hai.

  • pawan mishra
    pawan mishra Year ago

    Sir can we Automat oracle form by vba?

  • mithun nair
    mithun nair Year ago

    What to do if I want to click that Today's deal dropdown available in menu bar, but just using the tag CLASS and HREF only (i dont want to use TABINDEX) , i have a similar kind of web page having only those two tags

  • Swapnil Rathod
    Swapnil Rathod Year ago

    Hi Dinesh, How do i extract price value if i directly open OnePlus 5 mobile hyperlink on amazon? I don't want to go by category. I am directly opening product link. Please comment

  • huyen ngo
    huyen ngo 2 years ago

    Great! how to extract to excel from website with VBA?

    • Pamelia Johnson
      Pamelia Johnson 2 years ago +1

      📌YOU CAN 📌 CHECK MY website :BOL7 on google 🥇🥇, here is new updated SOFTWARE.. or skype : Hemant_136

    • huyen ngo
      huyen ngo 2 years ago

      hi Dinesh ,
      this is a PMT browser access file using VBA but I have no way to export to excel. I was waiting for you to send email for me but I didn’t receive it. You refer to this file and can help me accomplish it if possible.
      Sub Button1_Click()
      Dim objIE As Object
      Dim HTML As String
      On Error GoTo error_handler
      Set objIE = CreateObject("InternetExplorer.Application")
      With objIE
      .Navigate "hvpmt001/pm_hv/CFM_Sequence.aspx?monitorID=12&level=2&item=201"
      Do While .Busy: DoEvents: Loop
      Do While .ReadyState 4: DoEvents: Loop
      .Visible = True
      HTML = objIE.Document.Body.innerHTML
      .Document.Write "My Own Sequence Results!

    • Dinesh Kumar Takyar
      Dinesh Kumar Takyar  2 years ago

      At least 3 videos available.

  • Fernando Crisantos
    Fernando Crisantos 2 years ago +2

    This great! How would you collect data on a webpage with many links? Is there a loop you could implement?

    • Dinesh Kumar Takyar
      Dinesh Kumar Takyar  2 years ago

      Yes. You could implement a loop to search for the links in the source code.

  • Balaji bala
    Balaji bala 3 years ago

    Hello Sir,
    is it possible to do the same thing with google search results ??
    Thanks in advance

  • Miko Tan
    Miko Tan 3 years ago

    Hello Sir Dinesh, thank you. This is very helpful. I would like to know if it is possible to create a floating user form / window with object that is a mirror of an excel spreadsheet (i.e. for use in capacity plan).

  • Danny Joseph
    Danny Joseph 3 years ago

    You are just amazing Sir!! Is it possible to operate web applications which has forms?
    It would be great if you could guide me on how to find the codes in which forms are run, so that it would help me to operate the form in web based applications.
    Thanks in advance :)

    • Anil kumar g.s
      Anil kumar g.s Year ago

      Hi Sir.. Can you please let me know your website where I can find these Macro files.. Thanks in advance for your help.

    • Danny Joseph
      Danny Joseph 3 years ago

      Excellent! Thank you so much :)

    • Dinesh Kumar Takyar
      Dinesh Kumar Takyar  3 years ago

      +Danny Joseph Have you seen these videos:
      You may also like to search my channel.

  • Jack Pun
    Jack Pun 3 years ago

    Helpful video, thanks.

  • Tyson Price
    Tyson Price 3 years ago

    Thank you sir this is a nice video on the subject.

  • paraglide01
    paraglide01 3 years ago +2

    First to comment ;-)