How to Automate Data Entry in a web form using excel macros

Share
Embed
  • Published on Jun 11, 2018
  • In this tutorial we would learn:
    1. How to automate data entry in a web form
    2. How to fetch data from excel file and populate a web form/page

Comments • 342

  • VS Top
    VS Top 7 days ago

    Sir I get run time error 438

    • Automation Made Easy
      Automation Made Easy  4 days ago

      Add some delay

    • VS Top
      VS Top 6 days ago

      @Automation Made Easy macro work till upto open ther internet explorer and Facebook but not able to type I'd pass

    • Automation Made Easy
      Automation Made Easy  6 days ago

      At which point you get this error?

  • ALOK SAHU
    ALOK SAHU 11 days ago

    Excellent !!! Very helpful !!!

  • Yash Music
    Yash Music 12 days ago

    How to use this method for multiple links at the same time with same work sheet

  • RAVI RAHUL
    RAVI RAHUL 15 days ago

    object variable or with block variable not set error 91 how to resolve this

    • Automation Made Easy
      Automation Made Easy  15 days ago

      Application.Wait DateAdd("s", 2, Now)
      Put this line above the line throwing error.

    • RAVI RAHUL
      RAVI RAHUL 15 days ago

      i get this error object variable or with block variable not set error 91 when i click debug it highlights doc.getElementById("ctl00_ContentPlaceHolder1_txt_tbc").Value = ThisWorkbook.Sheets("form_fill").Range("B" & intRow).Value

      This line of COde

    • RAVI RAHUL
      RAVI RAHUL 15 days ago

      @Automation Made Easy Sub Data_Entry()

      Dim IE As Object
      Dim doc As HTMLDocument

      Set IE = CreateObject("InternetExplorer.Application")
      IE.Visible = True
      IE.navigate "workfromhomes.in/Customer/Default.aspx"
      Do While IE.Busy
      Application.Wait DateAdd("s", 1, Now)

      Loop
      Set doc = IE.document

      For intRow = 2 To 1501
      doc.getElementById("ctl00_ContentPlaceHolder1_txt_tbc").Value = ThisWorkbook.Sheets("form_fill").Range("B" & intRow).Value
      doc.getElementById("ctl00_ContentPlaceHolder1_txt_name").Value = ThisWorkbook.Sheets("form_fill").Range("C" & intRow).Value
      doc.getElementById("ctl00_ContentPlaceHolder1_txt_mobno").Value = ThisWorkbook.Sheets("form_fill").Range("D" & intRow).Value
      doc.getElementById("ctl00_ContentPlaceHolder1_txt_licenceno").Value = ThisWorkbook.Sheets("form_fill").Range("E" & intRow).Value
      doc.getElementById("ctl00_ContentPlaceHolder1_txt_Hadd").Value = ThisWorkbook.Sheets("form_fill").Range("F" & intRow).Value
      doc.getElementById("ctl00_ContentPlaceHolder1_btnsubmit").Click

      Application.Wait DateAdd("s", 2, Now)

      Next

      End Sub

    • Automation Made Easy
      Automation Made Easy  15 days ago +1

      share the code and mention at what point you are getting the error.

  • Akshay Sarkar
    Akshay Sarkar 19 days ago

    Help me with one solution, If there are multiple row to be enter in multiple row in website. Then how it works.

  • Indian Music
    Indian Music 26 days ago

    Hi I have a peoblem with add additional elements. Can you help for this

    • Automation Made Easy
      Automation Made Easy  25 days ago

      You will find the details in the About section of this channel.

    • Indian Music
      Indian Music 26 days ago

      @Automation Made Easy i have fill online application form on wpc website sacfa. There is 2page in the form .1st page is working fine. On 2nd page a separate additional window come for enter dd/challan details. I have facing issue on that part. If you provide me your mail id i will send you the details. With screen shot.

    • Automation Made Easy
      Automation Made Easy  26 days ago

      Sure, How can I help you

  • Shrishti Sajan
    Shrishti Sajan Month ago

    Hi the data that manually we have entered in the code is not reflecting in the excel sheet that i had saved. It is empty. Can you please help?

  • Jalal Khan
    Jalal Khan Month ago

    Please sir what will we do for multiple rows?

  • saroj behera
    saroj behera Month ago

    Hi,
    I have a question. Need your help. I have a form that takes data and submits it. I have an excel sheet with rows of data. I need to fill all the data. Is it possible? I mean it takes data from one row submits it and then comes back to 2nd row...and so on. Please advise.

    • Automation Made Easy
      Automation Made Easy  Month ago

      Certainly you can automate the task. Refer the below tutorial. It shall serve your purpose.
      ru-clip.net/video/docnLSdj8rI/video.html

  • NK STUDIO
    NK STUDIO Month ago

    Hi Sir ...
    Mera excel 2013 hai usme data ke option me jo option hai from web uske upper click kiya toh direct internet explorer open hora wo mujhe band karna hai .... Plz solution bataye eske upper
    Baki laptop me jab bhi use karta hu toh basic and advance option atta hai toh wo chahiye mujhe
    Plz sir help

  • RAVI RAHUL
    RAVI RAHUL Month ago

    What if any field is hidden which shows up when we select either one value from a drop down.

    • Automation Made Easy
      Automation Made Easy  Month ago

      yes this scenario can be handled. You will have to code for the field by manually selecting the option. If you have a page where you are facing this challenge, share the url of the page I will help you out.

  • RAVI RAHUL
    RAVI RAHUL Month ago

    1)can we upload any images in web form using micros
    2)How to handle Country State and District dropdown using Excel Micros.

  • Per Bøwadt Møller

    Any way to do something similar in google sheets?

    • Automation Made Easy
      Automation Made Easy  Month ago

      Not really.But you can refer below tutorial for something similar on google forms:
      ru-clip.net/video/6S6ib0dv0qk/video.html

  • RAVI RAHUL
    RAVI RAHUL Month ago +1

    How to do it for multiple Excel data

  • UBAID POOKOTTUR
    UBAID POOKOTTUR 2 months ago

    Hi, i am new to coding. i am trying to automate data entry in website using Internet Explorer. Here i can not select data in drop-down list. i used the code:

    IE.document.getElementById("ctl00_ContentPlaceHolder1_RadPanelApp_i0_INTUserLocation_ddlLocations").Value = 2

    The HTML element are as below:
    (Sorry i can not copy it, How to copy the HTML codes)
    Hoping your kind responses

    • UBAID POOKOTTUR
      UBAID POOKOTTUR 2 months ago

      @Automation Made Easy nationaltransportauthority.ae/mls/Online/LAND/RenewOpCardDetails.aspx?param=wCXjME3N6M2Y3FQY7Q13rCRxxnSgooWP6WRv3NQeZQdllaOpQZ%2fefQJzLl8A5epAF8uJZ1mU84P2mqmpIIagSh%2fCV9HmQUOXpxworJRJR4Jx69MEw0nQ2w%3d%3d

      this website has username and password

    • Automation Made Easy
      Automation Made Easy  2 months ago

      share link of your website

  • NENU NA YOUTUBE CHANNEL

    how to copy and paste three fields at a time from excel to web page

  • DESAI SUJIT
    DESAI SUJIT 2 months ago

    I have run time error Method document of object IWebBrowser2 failed

  • Nikhil Gaikawad
    Nikhil Gaikawad 2 months ago

  • Kartik Petkar
    Kartik Petkar 2 months ago

    Plz tell me how to fill Google form automatically data from excel

  • GhufranTV
    GhufranTV 2 months ago

    Very Useful !!

  • Hari Haran
    Hari Haran 2 months ago

    I am very much impressed with your video. It is highly useful to me.

    I need to know two things.

    1.How to use for loop for multiple data
    2.How to use for next page of form after submission

  • Reed Harvey
    Reed Harvey 2 months ago

    Thank you so much! But I am getting an error too! On this line: Set IE = CreateObject("InternetExplorer.Application"). Error 429 ActiveX

    • Reed Harvey
      Reed Harvey 2 months ago

      Thx I’ll try it!

    • Automation Made Easy
      Automation Made Easy  2 months ago

      what is the version of ms office and windows?
      This error generally occurs due to some corrupt ms office files. You may have to reinstall ms office.

    • Reed Harvey
      Reed Harvey 2 months ago

      Please help if you would be so kind:)

  • santhan vamsi
    santhan vamsi 2 months ago

    Hello sir, really a great video. I have a problem. Every time i click on run, it is opening a new internet explorer window but i want to focus on already opened internet explorer window and from there i need to take the element id. Please kindly help me.

    • Automation Made Easy
      Automation Made Easy  Month ago +1

      Refer my below tutorial of automating data entry on chrome browser:
      ru-clip.net/video/-GUw22ecRwI/video.html
      For handling frames use following code: obj.SwitchToFrame("identifier of the frame")
      once above line of code is executed you are in the frame and you can perform any operation the frame like
      obj.findElementBy("id of object").SendKeys or obj.findElementBy("id of object").Click.

      Once your operation is complete you have o move out of the frame using below code:
      obj.SwithToDefaultContent

      Hope this helps.

    • Lauren Sudhakar
      Lauren Sudhakar Month ago

      @Automation Made Easy I am having the same issue. I would like to use the macro to fill in a webpage, but the page contains an as well and I am unable to locate the id. Unfortunately, I cannot share the webpage because you need an account in order to sign in. Could you share a general example of how to populate fields in an ?

    • santhan vamsi
      santhan vamsi 2 months ago

      @Automation Made Easy actually i have tried a lot of code from Google. As I am new to VBA, i am unable to know the right code. Please kindly help me my a sample code for accessing an element from an

    • santhan vamsi
      santhan vamsi 2 months ago

      @Automation Made Easy actually it opens only in local system only. I just need to access an element in an .

    • Automation Made Easy
      Automation Made Easy  2 months ago

      I need to see the web page to comment.

  • Daniel P
    Daniel P 2 months ago

    Thank you very much for explaining this!

  • Ethan An
    Ethan An 2 months ago +1

    Thanks for the informative video.
    Is there a way you can do this the other way around?
    ex. From Web data to Excel.

    • Automation Made Easy
      Automation Made Easy  2 months ago +2

      Certainly yes. Refer below tutorials:
      ru-clip.net/video/docnLSdj8rI/video.html
      ru-clip.net/video/iIhEyrYfqbA/video.html

  • RAMKUMAR GUNTAMADUGU
    RAMKUMAR GUNTAMADUGU 2 months ago

    Hi Mr. Ashu,
    Thank you very much for your video. It really helped a lot!!!

    I created one similar kind of macro with this code, but it is not working fine in some computers. It is giving runtime error/ automation error.
    Could you please help me to debug this kind of automation error.


    Dim IE As Object

    Set IE = CreateObject("InternetExplorer.Application")

    IE.Top = 0
    IE.Left = 0
    IE.Width = 1800
    IE.Height = 1200
    IE.AddressBar = 1
    IE.StatusBar = 1
    IE.Toolbar = 1
    IE.Visible = True

    IE.Navigate "www.shiresystemdemo.com/PiranaRKHDemo2/Login.aspx?ReturnUrl=%2fPiranaRKHDemo2"

    Do While IE.Busy
    Application.Wait DateAdd("s", 1, Now)
    Loop

    IE.document.getElementById("ctl00_DetailsPlaceHolder_callBack_pcoMain_pnlWorkOrderDetails_txtDescription_ASPxTextBox1").Value = "Desc"

  • Mohd.Moinuddin Vohra
    Mohd.Moinuddin Vohra 2 months ago

    Hello, Thanks for the beautiful video. Can you please help me for generating a loop for multiple entries. Thanks in advance

  • Joseph Espinoza
    Joseph Espinoza 2 months ago

    Is there a way to automate data from excel to an already open web-page?

    • Automation Made Easy
      Automation Made Easy  2 months ago

      sorry for late response. but yes you can do that. Sample code given below:

      Set objShell = CreateObject("Shell.Application")
      IE_count = objShell.Windows.Count
      For intwinNo = 0 To (IE_count - 1)
      On Error Resume Next
      url = objShell.Windows(intwinNo).Document.Location
      If url = "url of the page on your opened ie browser"
      Set ie = objShell.Windows(intwinNo )
      Exit For
      Else
      End If
      '--here you can use the ie object to perform your tasks
      Next

  • anubha agrawal
    anubha agrawal 3 months ago

    Hi, could you please help to maximise the browser window while data is being entered.

    • Automation Made Easy
      Automation Made Easy  2 months ago

      sorry for late response:. Try below code:

      Private Declare Function ShowWindow Lib "user32" _
      () '(ByVal hwnd As Long, ByVal nCmdSHow As Long) As Long
      Const SW_SHOWMAXIMIZED = 3

      Sub test1
      Set IE = CreateObject("InternetExplorer.application")

      IE.Visible = True
      ShowWindow IE.hwnd, SW_SHOWMAXIMIZED
      IE.navigate "your url"
      End Sub

  • gox123
    gox123 3 months ago

    Thank you!

  • Krishna Murthy
    Krishna Murthy 3 months ago

    Excellent video it's very helpful for lamen like me. Thank u very much. I'm doing a project if need any help I'll ask u

  • Sukumar Sen
    Sukumar Sen 3 months ago

    Great video,
    Thanks for this

    • Sukumar Sen
      Sukumar Sen 3 months ago

      @Automation Made Easy Hi There, I am new to this but with some websites I find there is no id when I do an inspect element. How to do in those

    • Automation Made Easy
      Automation Made Easy  3 months ago +1

      your welcome

  • selvakumar v
    selvakumar v 3 months ago

    Hi,
    If the input elements is in inside table how to fill the value.. Please post video for that....
    Thanks

  • Rupender Gangji
    Rupender Gangji 3 months ago

    How can we reference or click on a pop-up dialogue box which comes up once we click save button on the main page...the pop-up gives ok and cancel button. I have to click on ok to get the record completed...could you please help me

  • Naga Durgarao Baddhi
    Naga Durgarao Baddhi 3 months ago

    I want to delete entire folder using excel macro

  • Naga Durgarao Baddhi
    Naga Durgarao Baddhi 3 months ago

    How to use this method for multiple links at the same time with same work sheet

  • Naga Durgarao Baddhi
    Naga Durgarao Baddhi 3 months ago

    When I am running excel macro I am getting excel sheet not responding, how to stop running macro with buttons in excel sheet, thank you!

  • Eric Flaherty
    Eric Flaherty 4 months ago

    I have a few hundred of the same form to fill out and was hoping to pull info from a spread sheet as you instructed. There is no direct link to the form page as it seems to have some sort of protection nor does it show the element Id in the html code. Any suggestions.

    • Naga Durgarao Baddhi
      Naga Durgarao Baddhi 3 months ago

      @Automation Made Easyin my website some buttons don't have id or name, now what can I do?

    • Automation Made Easy
      Automation Made Easy  4 months ago +1

      doc.getElementsByName("roof-last-name")(0).Value = "test1234"

      With above code you would be able to identify the web element without having id's

    • Eric Flaherty
      Eric Flaherty 4 months ago

      This is all it shows. I went as fas as adding the selenium object finder to google chrome and nothing shows up on the hover over.

  • Manish Bidarkar
    Manish Bidarkar 4 months ago

    Hello Sir, Very Good and Well explained. I want to create similar macro just want add one thing. I would like to upload a file from my pc to web. How could we do that ?

    • Automation Made Easy
      Automation Made Easy  4 months ago

      File upload dialogue is not a web object and hence it cannot be seamlessly automated without support of third part softwares.

  • Madan Raj
    Madan Raj 4 months ago

    Initially thanks a lot for giving up a free training ,I have been trying very hard on this it's not getting inputted of username and password ,would request to help me out would be very thankful in all way please"portal.dtcc.com"

    • Automation Made Easy
      Automation Made Easy  2 months ago

      paste the html of the dropdown

    • Madan Raj
      Madan Raj 2 months ago

      Any way to connect to web dropdown option without elements id of the drop-down menu kindly guide

    • Automation Made Easy
      Automation Made Easy  3 months ago +1

      Thanks Madan

    • Madan Raj
      Madan Raj 3 months ago

      Boss your ultimate and I can't estimate and understand what depth of knowledge do you hold 👌👏👏

    • Automation Made Easy
      Automation Made Easy  4 months ago +1

      I tried the same code and it works well. Below tutorial demonstrates an alternate way to automate. Try this approaach
      ru-clip.net/video/-GUw22ecRwI/video.html

  • Mueez Inc.
    Mueez Inc. 4 months ago

    Hello Sir, very grateful for making such informative and useful videos.
    Please help me out with this issue:
    I have to select a dropdown value by picking from excel. Then the next dropdown will be populated based on the previous selection and so on. However, the issue am facing is that the 3 dropdown boxes whichbare there in the webpage are populated with some values. The next dropdown changes only when I click the dropdown option and not when I select using its value

    • Automation Made Easy
      Automation Made Easy  4 months ago

      i understood your requirement but to understand the dynamics of html I need to actually analyze the webpage

    • Mueez Inc.
      Mueez Inc. 4 months ago

      @Automation Made Easy The dropdown values by default are LEName, LEBranch.
      There are a lot of options in the dropdown for LEName but LEBranch dropdown contains only 1 value. However when a particular LEName is selected by clicking, LEBranch is populated with respective Branch names.
      When I try selecting the dropdown values from excel by giving the id, the LEBranch gets filled with the only value because that's the only one which is present there.
      I need to select the LEName drop down, then wait for sometime to load values in the LEBranch dropdown, then fill the values from excel by id in the webpage.
      Hope this helps in understanding the problem

    • Automation Made Easy
      Automation Made Easy  4 months ago

      need to see the web page to suggest a solution.

  • dileep karna
    dileep karna 4 months ago

    Hello Sir.. Please reply

  • Sunil B Patel
    Sunil B Patel 4 months ago

    i want to my excel sheet data fill in website step by step rows and column data....please help me

  • selvakumar v
    selvakumar v 4 months ago

    Good video!!!!!
    Your explanation is awesome..

    • selvakumar v
      selvakumar v 4 months ago

      I have the image of that coding... Could you please provide your mail id... Then i can easily share....

    • Automation Made Easy
      Automation Made Easy  4 months ago

      Share the html of the element and the code on which you are getting error.

    • selvakumar v
      selvakumar v 4 months ago

      Thank you so much sir....
      But again i got an error in doc. getElementById() in the line... It's showing as objects doesn't support this property.... Please help me.....

    • Automation Made Easy
      Automation Made Easy  4 months ago

      Use below lines of code for invoking IE browser.

      Dim IE As InternetExplorerMedium
      Set IE = New InternetExplorerMedium
      IE.navigate "example.com"

    • selvakumar v
      selvakumar v 4 months ago

      Yes....

  • dileep karna
    dileep karna 4 months ago

    i have some query in macro writing.. can i get your details to contact ?

  • Sathish Kumar
    Sathish Kumar 4 months ago

    How to run this macro for sub menu link. Home - > Register Form ? How to open a webpage and navigate to specific menu.Any idea

    • Automation Made Easy
      Automation Made Easy  4 months ago

      Its possible , depends on how html is structured. you can share html of the page, will look into it.

  • Prashant kumar
    Prashant kumar 5 months ago

    I am getting an compile error "Procedure too long" can you help me please

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Your welcome

    • Prashant kumar
      Prashant kumar 5 months ago

      @Automation Made Easy Thanks a lot

    • Automation Made Easy
      Automation Made Easy  5 months ago +1

      Call nameofYourSubOrFunction()

    • Prashant kumar
      Prashant kumar 5 months ago

      @Automation Made Easy how can I call any sub or function in another sub

    • Automation Made Easy
      Automation Made Easy  5 months ago

      You get this error when you write entire code in one sub or a function. You will have to make functions and divide your code to avoid this error.

  • bala saravanan
    bala saravanan 5 months ago

    Br can you send me code

  • Mr. TwiTched
    Mr. TwiTched 5 months ago

    Great video bro. But how can we do this from external .XLSX file

    • Mr. TwiTched
      Mr. TwiTched 5 months ago

      @Automation Made EasyJust think You want to fill the Web form but this time all data like Firstname, last name, email etc is stored in another excel document, say "C:\doc.xlsx" so how can we do this now. Is there anyway.

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Thanks. I didnt get your question. Can you please elaborate

  • Patel Rahul
    Patel Rahul 5 months ago

    Sir can you plz make video how to get nseindia.com data into ms access automatically if you help me I will very thankful

  • pooja baluja
    pooja baluja 5 months ago

    Hi, can i put a button on excel sheet to execute the code? Also I want to fill the form one row at a time, not in a looped manner for i would be updating the excel sheet for every new entry, is it possible to get the data from the current row without having to modify the code?
    also can I use any other web browser like chrome or firefox?

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Yes you can put a button and best way to execute the data of each row would be a loop, but if you do not want to use a loop you use the same row Index. Refer below video for solutions to the above mentioned points
      ru-clip.net/video/vnIsNa4de7Mh/video.htmlttps://ru-clip.net/video/vnIsNa4de7M/video.html

      For execution on chrome browser refer below video:
      ru-clip.net/video/-GUw22ecRwI/video.html

  • karpelitgroup
    karpelitgroup 5 months ago

    Great instructional video. I subscribed. At the end you mention another video where you describe using "for loops" to transfer multiple lines of data from an excel sheet to a web form. Can you provide a link? Thanks.

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Thanks. Below is the link of the video you requested:
      ru-clip.net/video/vnIsNa4de7M/video.html

  • Hitesh Kanojia
    Hitesh Kanojia 5 months ago

    This is one of the far most beautifully explained video on macros for Data Entry....keep up the good work buddy.....

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Email me on automationandagile@gmail.com

    • Hitesh Kanojia
      Hitesh Kanojia 5 months ago

      @Automation Made Easy I need a help from you in a vba coding. I dont mind paying for it though...please suggest how we can discuss on it

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Thank You

  • betacarotinoid
    betacarotinoid 5 months ago +1

    How can you add an interval before every input?
    Great vid btw

    • Automation Made Easy
      Automation Made Easy  5 months ago +1

      Thanks. You can use the below line of code:
      Application.Wait DateAdd("s", 1, Now)

  • UBAID POOKOTTUR
    UBAID POOKOTTUR 5 months ago

    Very useful video for me

  • Ahmed Ismail
    Ahmed Ismail 6 months ago

    Hi, am new to VBA , but i have a problem , i have a work in EXCEL from 20 columns and thousands of rows, to enter all data in a cloud page, the page is numbered and use td , and tr a button next the table will take you to this page to add in, so each are different and href so i wonder , how to make a loop to
    1- open the page
    2- click the correct href edit button
    3- start editing from the selected raw
    4-submit and wait for the table page to open and then search for the next one tr number and go to one
    5- until it finished or didn’t find a number
    never find things like this all over

    • Automation Made Easy
      Automation Made Easy  6 months ago

      I need to see the web page. Can you share the link?.You can email me at automationandagile@gmail.com

  • Alan Lewis
    Alan Lewis 6 months ago +2

    Brilliant videos- I love them

    in the video above _ have got everything working but when I click on the submit button all the data from the elements disappears- can you assist at all?

    • Muhammad Ahmed
      Muhammad Ahmed 4 months ago

      @Automation Made Easy - Can you please send me the code for the above as well ?

    • Automation Made Easy
      Automation Made Easy  6 months ago

      I sent you the solution on your email

  • Nikhil Nikki
    Nikhil Nikki 6 months ago

    Auto captcha enter do on video about this..

  • Alan Lewis
    Alan Lewis 6 months ago

    Nice work- how about the "Submit button" what is the element for that?

  • SM world
    SM world 6 months ago

    Pls make new vedio ,using looping for multipleExcel data autofilup