Automate Internet explorer with Excel VBA Part 1

  • Published on Jul 3, 2016
  • Support Amarindaz on Patreon: --~--
    Theme: How to open google webpage using Internet explorer from Excel VBA
    Visit My Blog:
    Are you beginner to Excel VBA ? Check out my ebook:
    Facebook page:
    Recommended Excel VBA books
    In this video, you'll learn how to
    1)Open internet explorer
    2)navigate to google web page
    3)Wait until the browser gets loaded
    4)Close the browser
    using Excel VBA
    Code for Automating Internet explorer with Excel VBA
    Sub iepart2()
    Dim ie As Object
    Set ie = CreateObject("internetexplorer.application")
    With ie
    .Visible = True
    .navigate ""

    Application.Wait (Now + TimeValue("00:00:05"))
    Application.Wait (Now + TimeValue("00:00:05"))
    End With
    End Sub
    Please subscribe

Comments • 23

  • Jose Rossi
    Jose Rossi 29 days ago

    Thank you for replying.
    The problem I have how do I use them in a code what to look for in a website source and how do I know which one to use getElemenyByclass or getElementByTagName, if you can please give me a sample, much appreciated.
    Thanks again

  • Jose Rossi
    Jose Rossi 29 days ago

    I enjoyed your videos. I have an issue if you can please help me, I have a vba code to log in to website but the problem is that one website the id textbox is hidden so cannot use getelementsbyid what can I use and how,

    • Amarindaz
      Amarindaz  29 days ago

      You can use getElemenyByclass or getElementByTagName

  • Recep Yilmaz
    Recep Yilmaz 4 months ago

    Hi, I follow your videos and Like thats.
    I want to create an vba code to autocomplet a web from from worksheet datas.
    its work for 1 row data. i using the
    " For rowNo = 2 to 10
    next "
    but not working for me. apple all settings your learning. can you help me please sir?

  • Mukesh Kumar
    Mukesh Kumar 7 months ago

    Only for Internet Explorer run this code. Not work in Google Chrome

    • Amarindaz
      Amarindaz  7 months ago

      Yes . Only can work on Internet explorer through Excel VBA

  • Mukesh Kumar
    Mukesh Kumar 7 months ago

    How to use this cod by userform in Excell

  • Devendra
    Devendra 9 months ago

    Hi Amarindaz nice video... im facing a problem with internet explorer popups like... save file, open file or save passwrds.. pls help with the code how to manipulate IE messages.. thanks in advance.

  • Janelou Maizo
    Janelou Maizo Year ago

    how about the wholw workbook

  • indu ECE
    indu ECE Year ago

    i get the error in "Set ie = CreateObject(“internetexplorer.application”)" how to resove that?? plz help me..

    • Amarindaz
      Amarindaz  Year ago

      +indu ECE not sure why you're getting this do you have IE installed on your system. Probably if I look at the settings I'll get idea

    • indu ECE
      indu ECE Year ago

      Set ie = CreateObject(“InternetExplorer.Application”) - this line sir

    • Amarindaz
      Amarindaz  Year ago

      +indu ECE which line it's pointing to

    • indu ECE
      indu ECE Year ago

      yes sir, i removed. bt now i get "Run time error 424 object required " error message. how to resolve that sir?

    • Amarindaz
      Amarindaz  Year ago

      +indu ECE plz remove option explicit at the very first line

  • Sugat M
    Sugat M 2 years ago

    HI Amar,
    How to check if a textbox in a webpage is hidden or not thru vba

  • kamalakar b
    kamalakar b 2 years ago

    Hi Sir, I am an asst professor in engg college in india. I need to do result analysis for the examination results. I need to pull out the data from the web and then process it further. I am developing a macro to pull the data. I am able to open the webpages. But could not proceed further to get these data into excel. Can you help help me in this.
    i am able to open the web pages for the roll numbers y16me1201, y16me1202,y16me1203,y16me1204,y16me105. pasted in colum A of excel sheet. I run this vba code
    Sub results()
    Dim IE As Object
    Dim j As Integer

    For j = 1 To 5

    Set IE = CreateObject("InternetExplorer.Application")
    IE.Navigate ""
    IE.Visible = True
    Do While IE.readyState READYSTATE_COMPLETE
    IE.document.all("hno").Value = ThisWorkbook.Sheets("sheet1").Cells(j, 1).Value

    End Sub
    After open the webpages i am not sure how to get this data into excel. could you please help me in ths regard

  • Krish
    Krish 2 years ago

    Hi... thank you for videos. "Recommended Excel VBA books" links are not working, could you please provide working links.

  • Benjamin Mottram
    Benjamin Mottram 2 years ago

    Hi. Great video. what does "doevents" actually do here? just PAUSES/WAITS the script until ready state = 4? (or not busy)?