Use Excel & VBA to automate Internet Explorer -beginner

  • Published on Feb 22, 2016
  • from
    Learn to create web bots to automate data-intensive, time-consuming tasks using Excel and VBA.
    * * Step-by-step at * *
    Web scraping example project -- writing VBA code to automate Internet Explorer to get search results from a web page using methods such as getElementById and getElementsByClassName.
    First in the video series.
  • Howto & StyleHowto & Style

Comments • 48

  • Александр Жеребко

    very usefull information. It is good for contetnt managers.

  • سامي العيدروس

    Hi... Do you have Facebook account

  • Massimo Colaceci
    Massimo Colaceci 7 months ago

    Excellent tutorial! It helped me to drammatically automate data collecting. Thanks!

    ABHISHEK PATEL 9 months ago

    I'm trying to click. A button on a web site but am unable to do so
    The HTML code is

    • Ayush Dayama
      Ayush Dayama 3 months ago

      Take that space off between on click listener...
      And add quotes after () and ; is not necessary

  • Carlisson Correia

    thank you so much! really usefull video

  • Richard Tabuac
    Richard Tabuac Year ago

    I'm getting an error message " Object doesn't support this property or method. The code stops in this line: For Each aEle In objIE.document.getElementsByClassName("result__a")
    How would I debug this? Thanks

    • sakthi murugan
      sakthi murugan 7 months ago

      For this should I update IE or Excel?

    • mlogaN writeS
      mlogaN writeS 10 months ago

      If you are using IE8 and earlier 'getelementsbyclass' won´t work.

  • Christian Ibañez
    Christian Ibañez Year ago +1

    Great video. It is rare to see this kind of VBA tutorial, more advanced.

  • J Nada
    J Nada Year ago +13

    Dude, you need to work on this channel and bring it back to life. I think that if you get a better mic and publish 2 videos a week, nonstop for a year this channel would explode. Very valuable content.

  • Cayto Catugawa
    Cayto Catugawa Year ago +1

    Fire Fucks )))))

  • Marius Davidavicius

    AWSOME video, really helped to program auto-bot for "Travian"

  • mynameisyuriorlov

    Great !!! Automates a big job

  • undecided
    undecided Year ago

    Hello Sir, I refer to this web site and would really appreciate if you can answer my question. How can I transfer that auto web login script from Excel VBA to a VBScript Script File (.vbs) and make it functional? Also how do I save Excel VBA - when I click save it has only one option save FUNCRES.XLAM and there is no option to save anything else there? Thank you!

  • Michael C
    Michael C Year ago

    I do really like your tutorial !!!! However, it didn't work out the way you introduce but I figured it out by myself and I shorten your code into 2 lines except those dim. I would like to share with you if you are interested! Please contract me or email me.

  • Ashok Damodaran
    Ashok Damodaran Year ago

    Hello Need some help with the below code
    Sub test()
    Dim IE As InternetExplorer
    Set IE = New InternetExplorer
    IE.Visible = True
    IE.navigate ""
    IE.Toolbar = 0
    IE.Width = 1000
    IE.Height = 560
    IE.document.getElementById("lst-ib").Value = "Hi"
    'IE.document.getElementByValue("I'm Feeling Lucky").Click
    End Sub
    When i run the above code getting run time error please help

  • Dwizma
    Dwizma 2 years ago

    Hi can you guys tell me a way to click(not being mouse setcursorpos, sendekeys, or,, tagname, name) in a button considarating you're already manipulating Ie, i've tried these methods and nothing

    • Ian Naron
      Ian Naron Year ago

      have you tried .submit?

    • Dwizma
      Dwizma 2 years ago

      I've tried to ask in stack overflow, the title off the question is "Macro Vba -, not working button" if someone wants to help me i would be very glad :D, in the question i've specified the code of the button and the many methods i tried

  • Имя Фамилия
    Имя Фамилия 2 years ago

    Great video! Thanks a lot from Russia with love. :)

  • Nilesh Bhosale
    Nilesh Bhosale 2 years ago

    i have 1000s of company names in excel and want to search thier websites and also exctract email ids from the respective websites automatically using Excel VBA

  • Niranjan Kumar
    Niranjan Kumar 2 years ago

    But video is blurred 😔

  • Kaushik Patel
    Kaushik Patel 2 years ago

    sir please send me same module for Firefox on mail

  • cdsheffer001
    cdsheffer001 2 years ago

    I get "The object invoked has disconnected from its clients" error or "Automation Error"I will keep playing with it.

    • Lyle912
      Lyle912 Year ago

      I know this comment is a year old, but I'm having the same problem on my work computers. Do you know at what part you would get the error? I'm able to pull up the website fine, but when I try to populate a box I get that error. Was this the same for you?

    • cdsheffer001
      cdsheffer001 2 years ago

      This apparently happens because I was at work and it defaults as low priority and it doesn't find what it wants.

    • cdsheffer001
      cdsheffer001 2 years ago

      I was able to get it to work by changing Internet Explorer from" InternetExplorer" to "InternetExplorerMedium"

  • Angelina Lopez
    Angelina Lopez 2 years ago

    Automate tasks on Internet, BotChief may help.

  • Evandro Santos
    Evandro Santos 2 years ago +1

    Hi, I´m a beginner. What should I do when the search text box doesn´t have a ID?

  • D1 Comércio
    D1 Comércio 2 years ago

    I need your help ! I have a sheet but I can't click in the link, because it's in Java. Do you know how to do ?

  • John Paton
    John Paton 2 years ago

    Very good video, must give it a try, and modify for my particular need.

  • Deepan udaiyar
    Deepan udaiyar 2 years ago

    the button that i work with only has name .

    how can i click this button ?

  • Mario Serrano
    Mario Serrano 2 years ago +4

    It's a great video, but, what if when I search the ID of the cell at any browser (EI, Mozilla or Chrome), there is not information about it, just found " "? Regards.

    • Alex JIN
      Alex JIN Year ago

      Same question here, try to export data from Chrome

    • jack giorgio
      jack giorgio Year ago

      how can i do not open IE but chrome? same question

  • karthikeyan arunagiri
    karthikeyan arunagiri 2 years ago

    hi is that possible to automate the https friends says it's impossible to that with secured website...

  • Vitto
    Vitto 3 years ago +1

    Very well explained tutorial, great work

  • Shake y
    Shake y 3 years ago

    Wow really well explained code line by line….Every thought of doing a similar video for Ms Access users? How to get a form’s WebBrowser control page contents passed to a table

  • Kerry Ow Buland
    Kerry Ow Buland 3 years ago

    this website does not work. Is there an up to date website to access?

  • Daniel
    Daniel 3 years ago

    Really useful and well-explained, thanks.

  • shady mohsen
    shady mohsen 3 years ago +1

    Million thanks for this great and clear tutorial. When I searched IE automation I was looking for automating google speech recognition in IE, but I discovered that IE does not support the API and it is only supported by google chrome. Do you have any idea on how to automate this using IE?

  • Brad N
    Brad N 3 years ago

    Great video. I need to learn this and this video looks like a great start.