Filling a Web Form and Page with Microsoft VBA Excel Internet Explorer Application


Comments • 51

  • Harold McBroom
    Harold McBroom 8 months ago

    What happens if you go through all the elements and it doesn't find the "Sign Up" hyper link, are you stuck in an endless loop? Is there a "condition not satisfied" state to exist the for loop, and end subroutine with an error message?

  • dwad wadawd
    dwad wadawd Year ago

    Would it be possible to get a download link?

  • Ocean F
    Ocean F Year ago


  • Ocean F
    Ocean F Year ago

    Hi, I need to do UPLOAD an image bij VBA in a website with that possibility. Is there any extended explanation for that with a general code witch I can follow? thanks.

  • Lyle912
    Lyle912 Year ago

    When I do this on my site, it was change the Value under Inspect Element, but the text box itself won't change. Is there a way around this?

  • Abdullah Quhtani
    Abdullah Quhtani Year ago

    Great. But one important thing is missing. How to click submit button then read displayed data from the webpage and save that in excel sheet?

  • jesfjo
    jesfjo Year ago

    Must certain References be checked in Tools > references?

  • Mohit Mavani
    Mohit Mavani Year ago

    software that can fill the form automatically from excel sheet. Just submit should be manually.

    • Sooraj Singani
      Sooraj Singani Year ago

      Mohit Mavani submit can also be done by

  • Prakash Praaku
    Prakash Praaku Year ago

    This video is truely informative. Thank you sir.
    Can we automate to upload a pdf document to a specific website using VBA sir ??
    if so please upload a video on that, it will really help us a lot.
    Thanks in advance,
    Prakash GS

  • Rishi Darokar
    Rishi Darokar 2 years ago +1

    Hi Alex,
    can you please tell me, how to call date picker to set date?

  • jinson munjanattu
    jinson munjanattu 2 years ago

    how do you fill a text box in an already opened web page.?

  • Sarah Hayden
    Sarah Hayden 3 years ago

    Alex....I need to accomplish the identical result (below), but have to do it in chrome. Any help would be greatly appreciated.
    Private Sub SendsTextToFieldUsingIE_Click()
    Dim objIE As Object
    Set objIE = CreateObject("InternetExplorer.Application")
    Dim webSite As String
    webSite = ""
    With objIE
    .Visible = True
    .navigate webSite
    Do While .Busy Or .ReadyState

    objIE.Document.getElementByID("lst-ib").Value = "This is
    the block of sample text that I am sending to a field on a webpage"
    End With
    End Sub

  • Ionut Cohen
    Ionut Cohen 3 years ago

    Hi Alex,
    I have an HTML code like the one below. How can I create the macro to fill me the entity, username and the pass.
    Thank you!

    Secure Sign In...

    Forgot your password?

  • Samaneh Sh
    Samaneh Sh 3 years ago

    hi Alex , it was great , i want to do it . thank you

  • zummo TV
    zummo TV 3 years ago +1

    Alex can someone detect if i am using automation on the website?

  • kupkel711
    kupkel711 3 years ago

    Hi Alex. I was wondering if you can have a userform in excel fill it out and then click a button and it can navigate to a site and fill it in with the data you have inputed in the excel userform?

    • Alex C
      Alex C  3 years ago

      +kupkel711 Of course, check out this series:

  • Nefi Bernal
    Nefi Bernal 3 years ago

    Hello, i'm trying to do something similar but the form that i want to fill out has drop down fields, instead of free form text fields is there a way to do that?

    MUSTAFA BAKKAL 3 years ago

    is there any web side to copy of your code to use directly ?

  • Shereef Ismail
    Shereef Ismail 3 years ago

    Hi Alex, Any chance you can direct me to the code you use to select from online drop down lists?

  • Keith Aul
    Keith Aul 4 years ago

    I'm using the same website as you in this video and I'm only using the code up through the for loop to test things out and the code is not working for me. It never finds the phrase "Sign Up". How I know this is I put msgbox's through the for loop and if statement. The msgbox in the If statement never executes because the statement must always be false. Do you have an idea why it never finds the text "Sign Up"

  • Ofc. Contable Triana Khike

    my friend if i need firefox only change "internetexplorer.aplication" by "firefox.aplication" and ready?? i need fillling a web form but i need firefox and every field must click before to process..... i wait your answer thx...

  • Dinesh Kumar Takyar
    Dinesh Kumar Takyar 4 years ago

    Excellent. Very well explained. Thank you!

  • Night Knight
    Night Knight 4 years ago +1

    Hi Alex,
    I like your videos, the reason I'm leaving this comment is that I want to ask you if you know how to fill the webforms with data from Collums and cells. something like this : A1:A10 - First name , B1:B10 - Last Name , C1:C10 -Emails , D1:D10 - Upload Photo and so on.
    Can you help me please? :)
    Thanks a lot!

  • Steven Starkey
    Steven Starkey 4 years ago

    Really beneficial. Thank you for your help, Sir.

  • bbmak0
    bbmak0 5 years ago

    It is hard to follow your video series. After I watch this video, which one should I go to? and Where is the previous one?

    • bbmak0
      bbmak0 5 years ago

      @Alex Cantu thx... ur videos are great. I use the VBA in excel spreadsheet a lot, but I rarely use with the web. I would love to see more of these videos.

    • Alex C
      Alex C  5 years ago +1

      Hello! This video was not part of a series. If you are looking for a video series on VBA and the InternetExplorer.Application object, try this series:

  • kiewan
    kiewan 5 years ago

    Can you paste the code in about?

    • Alex C
      Alex C  5 years ago

      Hi - Don't have the code anymore. But if you play the video in 720P, you should be able to see the code. Thank you for watching!

  • Atul Mandal
    Atul Mandal 5 years ago +1

    Alex its seems not complete, can you please tell how to press button after it ?

    • Atul Mandal
      Atul Mandal 5 years ago

      @Alex Cantu Thank you Alex, I will go through this link, will let you know if some doubt remain ... Thanks again :)

    • Alex C
      Alex C  5 years ago +1

      @Atul Mandal Got it. There is a lot to learn then, and you should be familiar with the DOM (Document Object Model). I would recommend watching this series first:
      That will take about 3 hours of your life. :) but save you months, possibly even years of learning from the text books. If you have questions after, please let me know. I answer where and when I can. Thank you again!

    • Atul Mandal
      Atul Mandal 5 years ago

      Actually I need to submit roll number kind of data and save it by clicking button. Then grab the output data from a Web page.

    • Alex C
      Alex C  5 years ago

      Could you please give more background? What are you trying to accomplish?

  • Frank Turley
    Frank Turley 5 years ago

    Alex, thanks for the video, it is great. I now know what my new hobby will be in the next weeks (learning more about this), YOU DE MAN, Frank

    • Alex C
      Alex C  5 years ago

      Thank you for your feedback Frankie. Keep it up!

  • Peter Holst
    Peter Holst 5 years ago

    Yeps! Works fine! Super tutorials.. Thank you very much!

  • Peter Holst
    Peter Holst 5 years ago

    Can i make it check an uncheked-checkbox?

  • Willie Ayubo
    Willie Ayubo 6 years ago

    automatic file upload. :) thanks alot

  • dqbillos
    dqbillos 6 years ago

    Sir... thanks a lot!!! You explain really good, I don't know much about HTML or those codes, but I did what I wanted to do.

  • wiem zoghlami
    wiem zoghlami 6 years ago

    please,how i can do the same program with visual C++

  • Michael Washington
    Michael Washington 6 years ago

    Thanks again.

  • Michael Washington
    Michael Washington 6 years ago

    ok next bit of awesome:
    I tried doing what you just posted with
    Call IE.Document.GetElementByID("Prefill").Click
    based on the following bit of page source:
    input type="button" value="Prefill" onclick="prefill()"
    Yet it's not working. Any thoughts?

  • Michael Washington
    Michael Washington 6 years ago

    Yes. That was it. You The Man.

  • Michael Washington
    Michael Washington 6 years ago

    Trying to pass the contents of a cell, and I've got
    SetAttribute("value", ActiveSheet.Range("c2").Select)
    however i'm getting true as my output. instead of the result of the formula in the cell. Any Help?

  • Michael Washington
    Michael Washington 6 years ago

    Great video, did a search for something I need to automate and found this, could you start putting the code you use in the comments or a link to a pastebin? :p

  • ToUnplug
    ToUnplug 6 years ago

    Hi Alex - is there a way to read the data from xls or csv file... & loop it? Objective is to do more than one so it loops till end of file and we can do batch creations...

  • Chris Moore
    Chris Moore 6 years ago

    Thanks. The code works for me for entering data. But the last thing I need to know is how to click the Submit/Enter button. I cannot figure this out after multiple google searches. It seems like I should be able to identify the button and send a 'click' command, or something similar. How would you end your code by clicking the 'send' button? Thanks

  • Abdullah Mohammed Farooq

    I am trying to automate excel to enter addresses into google maps so the user can get the distance and time of travel from point A to B. Right now, I only know about internet explorer object from what you have posted in your channel. Hopefully more videos can help me know more of its functionality.