You are an insanely good teacher with this. I have successfully written the code to transfer hundreds of lines of text from an excel spreadsheet to a secure website. I had to watch a few of your videos to put it all together, for example: I came to this one just to learn how to loop the code, but by combining the parts I need, I have been able to solve a huge logistical problem. I don't have any coding experience, so these are incredibly helpful. The one request I have is making a video that explains how to insert code from excel spreadsheet that continues all the way through to the end of the looping, explaining how to add multiple lines of data from an excel sheet. My biggest challenge was piecing that together, but I know that would mean you do a lot of repetition, so considering what I was able to accomplish, I am just grateful you are posting.
I was googling for the exact same macro from the last 5 days. tried many gui macro recorders and bookmarklet scripts. nothing was so simple like yours. thanks bro. keep walking.
Thank this is the best tutorial very wholesome but I needed a few tweaks which I ended up spending 5 hours on but in the end all worked out thank you for effort in uploading good content. 👏👏👏
You made this video extremely easy to understand, especially to people who do not have a background in code. I was wondering if there is a way to do this if you were to navigate to different web pages? A project I am working on requires me to search a website for 47,000 cells of data and retrieve a line of information. Thanks again for your help!
Similar examples are provided on the blog automationandagile.com in Excel automation section. For you specific requirement I need to see the web page to suggest a solution
Sir excellent, your Video is so meaning full How to Automate Web Scraping Using Excel Macros with Chrome . Please let me know sir with same type if possible.
@@AutomationMadeEasy i am combining 2 of your tutorials. To fill in a web form and this one. It is working perfectly. 3 fields to populate and a clicker. However, there are return 3 data options I can choose from. One is within a text box, the others only by class name. It's a currency conversion form for a project of mine. So one thing is, it will not return as a number, because of the "." and "," differences. When it runs, i get blank. If i set the object to long it only displays 0,00
This video is awesome thank you so much. Just one question. How about if we have a webpage to enter 10 rows of data each time and the click on register and then another 10 entries from our remaining excel file until it is completed?
Hi sir, thanks for your tutorial it helped a lot, just have one question, you used introw = 2 to 5, is there any way to set the range to cell which has the final data? because I get a range of data for example 50 and some times 70. I just want to know whether I have to set the range every time manually or is there any way where I can set the data till the last row (Where data exists)..Your help is much appreciated!
Replace For loop by while loop. Syntax given below: Assume column A as the reference, intRow = 2 strData = ThisWorkBook.Sheets("Data").Range("A" & intRow).Text while (Trim(strData "") '-----Put the code here strData = ThisWorkBook.Sheets("Data").Range("A" & intRow).Text Wend
@@AutomationMadeEasy Thanks for your reply sir, actually, I'm new to VBA and landed here following your previous video "How to Automate Data Entry in a web form using excel macros", I'm just learning to do loop after automating the data entry from excel sheet. Everything works perfectly fine as per your guidance, it's just don't I want to fix the data range for eg (For intRow = 2 to 5) I want to continue looping this the till cell where the last data exists and close the IE browser. Will the code you have given above fit in it? Thanks in advance!
Sub Fill_Form() Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True ThisWorkbook.Sheets("Sheet1").Range("DZ1").Value = "=CountA(A:A)" intTotalRows = ThisWorkbook.Sheets("XYZ").Range("DZ1").Value For intRow = 2 To intTotalRows IE.Navigate "www.XYZ.com" Do While IE.Busy Application.Wait DateAdd("s", 1, Now) Loop Set AllHyperLinks = IE.document.getElementsByTagName("a") For Each hyper_link In AllHyperLinks If hyper_link.innerText = "XYZ" Then hyper_link.Click Exit For End If Next Do While IE.Busy Application.Wait DateAdd("s", 1, Now) Loop IE.document.getElementById("XYZ").Value = ThisWorkbook.Sheets("XYZ").Range("A" & intRow).Value IE.document.getElementById("XYZ").Click Application.Wait Now + TimeSerial(0, 0, 2) '
Thanks for this tutorial. I learnt it. But I wanted to try an automation on google but didn't see the id when I inspect it. I tried using class but it was filled with different characters and even space. My question is, in place of id, class and tags which other elements can I use when I am writing "getElementBy..." instruction?
Sorry i have never worked on macbooks so I comment, but below tutorial would serve your purpose irrespective of the operating system. th-cam.com/video/iIhEyrYfqbA/w-d-xo.html
Hi sir, Nice nice video..just have one query.. introw =2 to 5. Instead of setting it fixed can we have it automatically updated as per the data we entered. As it is 30 some time , 50 some times
Hi, this is something amazing. Now you're my only hope, pls suggest how can I use this way to automatically fetch specific cookie information from a webpage, pls pls pls pls pls reply.
Hello you're teaching skill in coding is excellent! Very helpful for me as a beginner in coding. I'm a fan now. btw, have tried coding but why is that I'm encountering an error 462? How can I fix that? Thanks!
Hi, this was really helpful. Thank you for creating the video. I am following your instructions to fill out a form on a site, where the inspect option on the Submit Request button shows me the following info: input type="submit" value="Submit request" I tried several dozen combinations of your "doc.getElementById("btnCalculate").Click" code, and I cannot get the macro to click the submit button. Do you have any suggestions? Thanks in advance.
I keep getting the error Object Variable or With block variable not set. It seems to be referring to my line where I create the variable equal to what I want to pull from the webpage. Thank you for the awesome video :)!
yes we can do that but it would be complicated, But by using selenium vba and xpaths the same task becomes very easy. Below is the link to Selenium VBA tutorial. You may refer that and create xpaths using parent, child, siblings etc. th-cam.com/video/-GUw22ecRwI/w-d-xo.html
Suggestion, keep the link to download the practice file. Will save us a lot of typing :P Great tutorials! Question: How to fill the text-boxes and dependent drop-downs if the click opens on a new page/frame and has dynamic URL of the new page?
Hi, thanks for the wonderful video. I have a doubt. How can use the text box, if the ID was not provided on the actual code? Because I can find only Name, type, no ID in the code?
Thank you for the detailed explanation! Still I have a Question we used introw for number of row the macro should search in Web it was restricted to number of row entered in macro like 5 in this video, any thing entered in 6th row will not get the answer So if i put introw as 50 rows and i need answer for only for 10 still the macro will run for 50 is there any option to put number of row macro should run should be number of rows entered in excel and macro stops after that.
You can use excel formulae to get the total row count. Example given below: ThisWorkBook.Sheets("SheetName").Range("AZ1").Value = "=CountA(A:A)" intRows = ThisWorkBook.Sheets("SheetName").Range("AZ1").Value variable intRows will have total row count.
'AZ' is referring to column header. If you scroll to the right on the sheet you will see column AZ. You can use any column of your choice. And 1 is referring to the first row. So in the first row of column AZ I am stroing count of rows.
Great video, thank you so much! This is my first time trying any sort of script writing and I am running into an error on the first getElementById line after "For intRow = ____". If I set the value to equal a hard-code number, it inputs the number successfully in the field on the website I'm getting data from. But when I set it to input a value in my workbook sheet within the given range, I get the 'subscript out of range' error. The element on the webpage is text, and I even tried to format the values in my workbook as text and use 'text' instead of 'value' in the script, but no luck. Do you have any suggestions?
Check the spelling of the sheet name. Incorrect spelling of shee name could be a potential cause of the error. check in ThisWorkBook.Sheets("SheetName").Range("A" & 4).text. Check the spelling of "SheetName". IF you still get the error share your code I will look into it.
@@AutomationMadeEasy I checked the spelling and still got the same error. Here's an excerpt from the script, the bottom line is the one that I get errors on. I tried variations of the following including changing 'Value' to 'Text'. Set doc = IE.document For intRow = 5 To 1000 IE.document.getElementById("address").Value = ThisWorkbook.Sheets("Lookup").Range("A" & intRow).Value
hey i have a small question. love your guide btw! I wanna do it like this: run macro, open IE, fill in form on the page from row 1 in excel, send, close IE, open IE, fill in form on the page from row 2 in excel,, send, close, open etc. How do i loop IE to close and open and remember the row it has to fill?
Thanks. Try with below code snippet: For intRow = 2 to 10 '------ur total rows Set IE = CreateObject("InternetExplorer.Application") IE.Visible = Trur IE.navigate "your url" Application.Wait DateAdd("s", 4, Now) Set doc = IE.document '--- Put your code in the next few lines IE.Quit Next
Hi this was video is awesome. Thanks for such a nice explanation. I applied to some website and it worked successfully where class name was constant. I was thinking if you could help me to do the same in a webpage where class name is dynamic and changes with each input.
@@AutomationMadeEasy Actually that's a page where we input something and then a status comes up. Now the whose result is in the form of a table. So is table scrapping possible.
I am using Excel 2019 for Mac and in Available References, I do not find Microsoft Internet Controls or Microsoft HTML Object Library. Any idea how to add them? Many thanks.
Hi, I’m new to VBA and your video is so clear, however, I have a doubt, how about the code to fetching data with 1 text box in the website. Please assist.
hello my friend once again im in a bit trouble for example regarding the macro i tould you with a lot of data on multiple columns so i need to make that when the data is filled then it waits for the user (so he can solve captcha) then the macro resumes ... now instead of posting a simpe result like that i want to make it for example as following after captcha has been entered the script "waits" until the result page is loaded then it need to read for 2 specific file names to determine the result for example if its valid it will read "images/si-vota-resultado.png" in wich case i want it to post just a simple "valid" in the other hand we have negative state wich loads images/no-vota.jpg" file either way i just care about the valid ones so ... i need to create something that when "si-vota-resultado" is found then it types the word valid as the result anything else will lead to continue the project after that i need to "re-start" over it again but this time with values on row 2 then 3 then 4 and so on i really really dont know how to achieve this i have been checking the video over and over again but i dont seem to find a way to detect that specific image name would be cool if you can share another way to contact you so maybe it could be easier to explain ... btw i would like to buy yo a coffe for your big effort man
okay nevermind i think i figured out ... i have found that when its valid it creates a different class that isnt getting called when its not valid i just wonder if: doc.getElementsByClassName("col-xs-6 col-sm-8 table-responsive").Value = Buena will work and also if the function will expect that return kinda forever what i really wnat to achieve is the following 1.- user starts the macro 2.- macro fills in data 3.- macro waits for user interaction (in other words it waits for the user to solve re-captcha) 4.- macro waits for the page with the results after the user has clicked "check" in above step then the result comes in a xxxx.xxx/resultado.html page 5.- macro checks for that particular class "col-xs-6 col-sm-8 table-responsive" if its found post "VALID" as result if not it returns to the original site and post row 2 why i want to make this its around 14 Million data sets that needs to be compared and since its already difficult by copy one by one and also solving the captcha i want to make my life a bit easier :(
once again and after doing some research it seems like the best way to wait for user interaction is this Msgbox "Click to go on", , "Example" and in the case they are looking form something specific seems like the best way is this Set element = doc.getElementsByClassName("col-xs-6 col-sm-8 table-responsive")("VALIDA") and then just call the element if the responses im not aware if it works or not as i have said its around 7M data fields wich i need to first "arrange" so no mistakes will be made but i like to post how or what do i got in order for someone else who has the same issue will solve theyre issues (sorry for commenting your thread a lot)
Nice Tutorial brother! 👍 Its working fine with some other website. But when I open our specific site it throws the error saying: Run-time error -2147417848 (80010108) Automation error. The object invoked has disconnected from its clients. I would be thankful if any solution Comes out.
I have used Selenium Library, and google chrome to open url instead of IE. How can I get Text same class by loop function, I tried this code “For intRow 2 To 4 (“hit Enter to next line”) strName = obj.FindElementByClass(“class-name”).(intRow).Text” but it’s not work!
I Follow alot of your vides and I learn alot you so good in Teaching I'm not sure how I can ask your help as you dont have facebook or twitter ...etc so I will ask you hear when I full the feild using the script below it will stay like no witen in it even it shows writen and there is the botten should activet after the feild have some text objIE.document.getElementById("post-title-0").Value = _ Sheets("Data").Range("A" & intRow).Value () The botten not activeted 'click the 'Draft' button objIE.document.getElementByshortcut("Ctrl+S").Click (Save Draft) I use shortcut to find it but cant becz of the first feild. please contact me on my email if you know how to fix it (email: hisjios@gmail.com ) thank you so much
@@AutomationMadeEasy your example doc.getElementById("num1"). Value = 4. Can the value be letters or just numbers? What if i wanted letters instead of numbers?
I have a doubt. I want to perform certain steps after login in. But I need to enter captcha for logging in. So how do I program the script to start running again once login button is clicked
Put a message box where captcha is expected. The execution will pause when messages box will be displayed. Manually enter captcha at this point. Once done clik on the message box. Execution will continue from that point. Synatx for message box given below: MsgBox "Wait"
Hello Bro, how to select a specific option in website drop-down list by VBA web scraping method, and also can we able to select the drop-down based on values or words in excel. Please help
I'm sorry about my bad English. How I can replace that straight link (IE.navigate "www.automationandagile.com/p/demo-page.html") if I have already form open in IE and wanna use that open form? I can't use that straight link because form is back of password. I have to search first correct vehicle and after that I can open form. ...in other words, address/url of the form changes every time.
Automation Made Easy I’m also stuck with another part. The button I’m wanting to use only has a input value and type... how could I use either one? Thanks again!
I'm getting a debug error on my strName line. Error says object variable or with block variable not set. Can you solve this error? strName = doc.getElementsByClassName("view_more_summary")(0).innerText
You are an insanely good teacher with this. I have successfully written the code to transfer hundreds of lines of text from an excel spreadsheet to a secure website. I had to watch a few of your videos to put it all together, for example: I came to this one just to learn how to loop the code, but by combining the parts I need, I have been able to solve a huge logistical problem. I don't have any coding experience, so these are incredibly helpful. The one request I have is making a video that explains how to insert code from excel spreadsheet that continues all the way through to the end of the looping, explaining how to add multiple lines of data from an excel sheet. My biggest challenge was piecing that together, but I know that would mean you do a lot of repetition, so considering what I was able to accomplish, I am just grateful you are posting.
Glad, you found the tutorials helpful
I was googling for the exact same macro from the last 5 days. tried many gui macro recorders and bookmarklet scripts. nothing was so simple like yours. thanks bro. keep walking.
Your welcome.
Excellent video tutorial. Will certainly be watching more. Thanks for the very thorough work.
Glad you enjoyed it!
Thanks for sharing this video, excellent explanation for beginners. well done. It help me a lot.
Glad to hear that!
Automation Made Easy makes awesome content and does outstanding work. Full support for his tutorials.
Thank you
@@AutomationMadeEasy can you contact me?
@@juniorz289 Sure. Share contact details
@@AutomationMadeEasy thanks for the quick reply. Please contact me on telegram if possible @URLMONSTA
Thank this is the best tutorial very wholesome but I needed a few tweaks which I ended up spending 5 hours on but in the end all worked out thank you for effort in uploading good content. 👏👏👏
Glad it helped
Thanks for the video - it is really easy to understand and recommended my colleagues to watch all of your videos
Great to hear!
I am grateful for your videos! Thank you so much for your clarity and perspective!!
I'm so glad!
You made this video extremely easy to understand, especially to people who do not have a background in code. I was wondering if there is a way to do this if you were to navigate to different web pages? A project I am working on requires me to search a website for 47,000 cells of data and retrieve a line of information. Thanks again for your help!
Similar examples are provided on the blog automationandagile.com in Excel automation section. For you specific requirement I need to see the web page to suggest a solution
thanks vry much sir, you save my life. Indonesian people
Indian
Sir excellent, your Video is so meaning full How to Automate Web Scraping Using Excel Macros with Chrome . Please let me know sir with same type if possible.
I would like to know the same
Very informative 👍
Glad it was helpful!
Very useful and simplified explanation! Keep up the good work
Glad it was helpful!
Very helpful video. Keep up the good work.
Thanks!
Vry well explained sahb
thnx
you are a genious. it super worked, i´ve been looking 4 this 4 months!!!
thank you
Very clear, excellent!! Where is the link to download the practice code in the video?
refer about section of the channel. You will find the blog link there
Looks easy! 😊
I might get an AI validation Gig. I was thinking of automating it, so I could drink my coffee and not clicking! 👍
The tutorial works great. I have followed a few of your tutorials. Is there a solution to get data from a website if the return is empty?
Can you give an example of a web page where you get empty as return value. It would be easier for me too provide you a solution with a live example.
@@AutomationMadeEasy i am combining 2 of your tutorials. To fill in a web form and this one. It is working perfectly. 3 fields to populate and a clicker. However, there are return 3 data options I can choose from. One is within a text box, the others only by class name. It's a currency conversion form for a project of mine. So one thing is, it will not return as a number, because of the "." and "," differences. When it runs, i get blank. If i set the object to long it only displays 0,00
@@AutomationMadeEasy can you give me your email address and I can provide you with a link?
You can find it in the 'About' section of the Channel page
This video is awesome thank you so much. Just one question. How about if we have a webpage to enter 10 rows of data each time and the click on register and then another 10 entries from our remaining excel file until it is completed?
well it can be achieved but if the structure of your excel file is different I will need to look into it to suggest a solution
@@AutomationMadeEasy Could i send you an email please?
@@pfarr6369 info@automationandagile.com
sure contact info is provided in the about section of the channel
Hi sir, thanks for your tutorial it helped a lot, just have one question, you used introw = 2 to 5, is there any way to set the range to cell which has the final data? because I get a range of data for example 50 and some times 70. I just want to know whether I have to set the range every time manually or is there any way where I can set the data till the last row (Where data exists)..Your help is much appreciated!
Replace For loop by while loop. Syntax given below:
Assume column A as the reference,
intRow = 2
strData = ThisWorkBook.Sheets("Data").Range("A" & intRow).Text
while (Trim(strData "")
'-----Put the code here
strData = ThisWorkBook.Sheets("Data").Range("A" & intRow).Text
Wend
@@AutomationMadeEasy Thanks for your reply sir, actually, I'm new to VBA and landed here following your previous video "How to Automate Data Entry in a web form using excel macros", I'm just learning to do loop after automating the data entry from excel sheet. Everything works perfectly fine as per your guidance, it's just don't I want to fix the data range for eg (For intRow = 2 to 5)
I want to continue looping this the till cell where the last data exists and close the IE browser. Will the code you have given above fit in it?
Thanks in advance!
share ur code
@@AutomationMadeEasy Here you go Sub Fill_Form()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
intRow = 2
IE.Navigate "www.XYZ.com"
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
Set AllHyperLinks = IE.document.getElementsByTagName("a")
For Each hyper_link In AllHyperLinks
If hyper_link.innerText = "XYZ" Then
hyper_link.Click
Exit For
End If
Next
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
IE.document.getElementById("XYZ").Value = ThisWorkbook.Sheets("XYZ").Range("A" & intRow).Value
IE.document.getElementById("XYZ").Click
Application.Wait Now + TimeSerial(0, 0, 2) '
Sub Fill_Form()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
ThisWorkbook.Sheets("Sheet1").Range("DZ1").Value = "=CountA(A:A)"
intTotalRows = ThisWorkbook.Sheets("XYZ").Range("DZ1").Value
For intRow = 2 To intTotalRows
IE.Navigate "www.XYZ.com"
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
Set AllHyperLinks = IE.document.getElementsByTagName("a")
For Each hyper_link In AllHyperLinks
If hyper_link.innerText = "XYZ" Then
hyper_link.Click
Exit For
End If
Next
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
IE.document.getElementById("XYZ").Value = ThisWorkbook.Sheets("XYZ").Range("A" & intRow).Value
IE.document.getElementById("XYZ").Click
Application.Wait Now + TimeSerial(0, 0, 2) '
Thanks for sharing :) I'm really enjoy your tutorial.
Thanks for watching!
Thanks for this tutorial. I learnt it. But I wanted to try an automation on google but didn't see the id when I inspect it. I tried using class but it was filled with different characters and even space. My question is, in place of id, class and tags which other elements can I use when I am writing "getElementBy..." instruction?
any updated video on this? because internet explorer is not operational anymore, nice video.
Very good, thank' a lot, you are the beste
Happy to help
Thank you for the demonstration. I use Macbooks and the Safari browser with Excel for Mac. What would the command to call the safari browser be?
Sorry i have never worked on macbooks so I comment, but below tutorial would serve your purpose irrespective of the operating system.
th-cam.com/video/iIhEyrYfqbA/w-d-xo.html
this is incredible. thank you so much. How can I get in touch with you ?
write into info@automationandagile.com
Hi sir,
Nice nice video..just have one query.. introw =2 to 5.
Instead of setting it fixed can we have it automatically updated as per the data we entered. As it is 30 some time , 50 some times
yes put formual =CountA(A:A) in any of the unused columns. This will give total rows.
First read the data from this cell and us it in the loop
Hi, this is something amazing. Now you're my only hope, pls suggest how can I use this way to automatically fetch specific cookie information from a webpage, pls pls pls pls pls reply.
not aware of that
Hello you're teaching skill in coding is excellent! Very helpful for me as a beginner in coding. I'm a fan now.
btw, have tried coding but why is that I'm encountering an error 462? How can I fix that? Thanks!
what is the error description.
Hi, this was really helpful. Thank you for creating the video.
I am following your instructions to fill out a form on a site, where the inspect option on the Submit Request button shows me the following info: input type="submit" value="Submit request"
I tried several dozen combinations of your "doc.getElementById("btnCalculate").Click" code, and I cannot get the macro to click the submit button. Do you have any suggestions?
Thanks in advance.
Try alternate approach explained below:
th-cam.com/video/AEp0Yeis9AM/w-d-xo.html
I keep getting the error Object Variable or With block variable not set. It seems to be referring to my line where I create the variable equal to what I want to pull from the webpage. Thank you for the awesome video :)!
Great video. I have a question. Is there any option in vba to find the parent or child tag for certain tag?
yes we can do that but it would be complicated, But by using selenium vba and xpaths the same task becomes very easy. Below is the link to Selenium VBA tutorial. You may refer that and create xpaths using parent, child, siblings etc.
th-cam.com/video/-GUw22ecRwI/w-d-xo.html
Is there any macro support edge browser in web automate.
Suggestion, keep the link to download the practice file. Will save us a lot of typing :P Great tutorials!
Question: How to fill the text-boxes and dependent drop-downs if the click opens on a new page/frame and has dynamic URL of the new page?
Hi, thanks for the wonderful video. I have a doubt. How can use the text box, if the ID was not provided on the actual code? Because I can find only Name, type, no ID in the code?
Refer belw tutorial:
th-cam.com/video/Qknt8qFR7kY/w-d-xo.html
@@AutomationMadeEasy Thanks a lot bro.. That ll really helps. I'll try this Tmrw and let you know.
Thank you for the detailed explanation! Still I have a Question
we used introw for number of row the macro should search in Web it was restricted to number of row entered in macro like 5 in this video, any thing entered in 6th row will not get the answer
So if i put introw as 50 rows and i need answer for only for 10 still the macro will run for 50
is there any option to put number of row macro should run should be number of rows entered in excel and macro stops after that.
You can use excel formulae to get the total row count. Example given below:
ThisWorkBook.Sheets("SheetName").Range("AZ1").Value = "=CountA(A:A)"
intRows = ThisWorkBook.Sheets("SheetName").Range("AZ1").Value
variable intRows will have total row count.
@@AutomationMadeEasy what is the definition here of range ("az1).value
Please explain
'AZ' is referring to column header. If you scroll to the right on the sheet you will see column AZ. You can use any column of your choice. And 1 is referring to the first row. So in the first row of column AZ I am stroing count of rows.
Great video, thank you so much! This is my first time trying any sort of script writing and I am running into an error on the first getElementById line after "For intRow = ____". If I set the value to equal a hard-code number, it inputs the number successfully in the field on the website I'm getting data from. But when I set it to input a value in my workbook sheet within the given range, I get the 'subscript out of range' error. The element on the webpage is text, and I even tried to format the values in my workbook as text and use 'text' instead of 'value' in the script, but no luck. Do you have any suggestions?
Check the spelling of the sheet name. Incorrect spelling of shee name could be a potential cause of the error. check in ThisWorkBook.Sheets("SheetName").Range("A" & 4).text. Check the spelling of "SheetName". IF you still get the error share your code I will look into it.
@@AutomationMadeEasy
I checked the spelling and still got the same error. Here's an excerpt from the script, the bottom line is the one that I get errors on. I tried variations of the following including changing 'Value' to 'Text'.
Set doc = IE.document
For intRow = 5 To 1000
IE.document.getElementById("address").Value = ThisWorkbook.Sheets("Lookup").Range("A" & intRow).Value
cant make out from this code. Share your spreadsheet at info@automationandagile.com
An excellent tutorial
Many thanks!
Really helpful ..Can I get conversion rates (USD - EUR) from Oanda.com altering the same code?
Yes, you can
thanks for the video
You're welcome
hey i have a small question. love your guide btw! I wanna do it like this: run macro, open IE, fill in form on the page from row 1 in excel, send, close IE, open IE, fill in form on the page from row 2 in excel,, send, close, open etc. How do i loop IE to close and open and remember the row it has to fill?
Thanks. Try with below code snippet:
For intRow = 2 to 10 '------ur total rows
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = Trur
IE.navigate "your url"
Application.Wait DateAdd("s", 4, Now)
Set doc = IE.document
'--- Put your code in the next few lines
IE.Quit
Next
Sir you are great
Thank you
Hi this was video is awesome. Thanks for such a nice explanation. I applied to some website and it worked successfully where class name was constant. I was thinking if you could help me to do the same in a webpage where class name is dynamic and changes with each input.
Yes thats possible, need to see how the page is designed.
@@AutomationMadeEasy Actually that's a page where we input something and then a status comes up. Now the whose result is in the form of a table. So is table scrapping possible.
yes its very much possible.
@@AutomationMadeEasy Can you please demonstrate that through a video. Thank you .
noted
I am using Excel 2019 for Mac and in Available References, I do not find Microsoft Internet Controls or Microsoft HTML Object Library. Any idea how to add them? Many thanks.
this approach is compatible with Windows OS
Thanks a lot
It really really helped
Glad it helped
Sir how to export single data (td) from whole table in excel. please upload a video
Hi, I’m new to VBA and your video is so clear, however, I have a doubt, how about the code to fetching data with 1 text box in the website. Please assist.
refer below tutorial:
th-cam.com/video/docnLSdj8rI/w-d-xo.html
hello my friend once again im in a bit trouble for example regarding the macro i tould you with a lot of data on multiple columns so i need to make that when the data is filled then it waits for the user (so he can solve captcha) then the macro resumes ... now instead of posting a simpe result like that i want to make it for example as following
after captcha has been entered the script "waits" until the result page is loaded then it need to read for 2 specific file names to determine the result for example if its valid it will read "images/si-vota-resultado.png" in wich case i want it to post just a simple "valid" in the other hand we have negative state wich loads images/no-vota.jpg" file either way i just care about the valid ones so ... i need to create something that when "si-vota-resultado" is found then it types the word valid as the result anything else will lead to continue the project after that i need to "re-start" over it again but this time with values on row 2 then 3 then 4 and so on i really really dont know how to achieve this i have been checking the video over and over again but i dont seem to find a way to detect that specific image name would be cool if you can share another way to contact you so maybe it could be easier to explain ... btw i would like to buy yo a coffe for your big effort man
okay nevermind i think i figured out ... i have found that when its valid it creates a different class that isnt getting called when its not valid i just wonder if:
doc.getElementsByClassName("col-xs-6 col-sm-8 table-responsive").Value = Buena
will work and also if the function will expect that return kinda forever
what i really wnat to achieve is the following
1.- user starts the macro
2.- macro fills in data
3.- macro waits for user interaction (in other words it waits for the user to solve re-captcha)
4.- macro waits for the page with the results after the user has clicked "check" in above step then the result comes in a xxxx.xxx/resultado.html page
5.- macro checks for that particular class "col-xs-6 col-sm-8 table-responsive" if its found post "VALID" as result if not it returns to the original site and post row 2
why i want to make this its around 14 Million data sets that needs to be compared and since its already difficult by copy one by one and also solving the captcha i want to make my life a bit easier :(
once again and after doing some research it seems like the best way to wait for user interaction is this
Msgbox "Click to go on", , "Example"
and in the case they are looking form something specific seems like the best way is this
Set element = doc.getElementsByClassName("col-xs-6 col-sm-8 table-responsive")("VALIDA") and then just call the element if the responses im not aware if it works or not as i have said its around 7M data fields wich i need to first "arrange" so no mistakes will be made but i like to post how or what do i got in order for someone else who has the same issue will solve theyre issues (sorry for commenting your thread a lot)
can you suggest me any course or book i should get through to learn or anyway i can professionally use excel with vba in my career.
I can take an online course. You can find my contact details in the 'About' section of this channel.
My references do no include Microsoft Internet Controls or Microsoft HTML Object library. Is it because I am using Excel on a Mac?
yes . works only on wondows
how to do this in loop.
like up to 10 browser tab?
thanks!
Thanks for the code.. But I am getting compilation error User- defined type not defined.. can u help me how to solve it
did u select the libs from tools/references?
Hi
When I getelementbytagname, there are let's say 10 tag names. How to jump on to let's say 3rd tagname and get that inner text??
doc.getElementsByTagNane("name of tag")(2).innertext
index begins from 0 hence 2nd index is actually pointing to 3rd element on the web page
@@AutomationMadeEasy When I enter that, I get a runtime error 424
Which says object required.
need to see ur web page and script
Nice Tutorial brother! 👍
Its working fine with some other website.
But when I open our specific site it throws the error saying:
Run-time error -2147417848 (80010108) Automation error.
The object invoked has disconnected from its clients.
I would be thankful if any solution Comes out.
I have used Selenium Library, and google chrome to open url instead of IE. How can I get Text same class by loop function, I tried this code “For intRow 2 To 4 (“hit Enter to next line”) strName = obj.FindElementByClass(“class-name”).(intRow).Text” but it’s not work!
(obj.FindElementByXpath(//*[@class-'classname']))[0].text
I Follow alot of your vides and I learn alot you so good in Teaching
I'm not sure how I can ask your help as you dont have facebook or twitter ...etc so I will ask you hear
when I full the feild using the script below it will stay like no witen in it even it shows writen and there is the botten should activet after the feild have some text
objIE.document.getElementById("post-title-0").Value = _
Sheets("Data").Range("A" & intRow).Value
()
The botten not activeted
'click the 'Draft' button
objIE.document.getElementByshortcut("Ctrl+S").Click
(Save Draft)
I use shortcut to find it but cant becz of the first feild.
please contact me on my email if you know how to fix it (email: hisjios@gmail.com ) thank you so much
what if i dont want the results on the spreadsheet and just have it data entry into the cells on web page, than click save and goto line 2 for next
you have to just store the fetched value in a variable and use the variable in data entry
@@AutomationMadeEasy your example doc.getElementById("num1"). Value = 4. Can the value be letters or just numbers? What if i wanted letters instead of numbers?
doc.getElementById("num1"). Value = "test"
@@AutomationMadeEasy i am working on code for yahoo finance to look up stocks cop jnj
Hi
Plz help for
Waiting time until page load for chrome
This code is not working
And thank u very much with your help I have completed my one poject
share lin of the page
if input given, but webpage asking enter TAB. what is the code for this situatation
Application.SendKeys"{TAB}"
wow just love your videos keep posting more i want to learn excel vba from scratch
Thanks. Below is the link of my latest tutorial:
th-cam.com/video/7a8IofqBNo4/w-d-xo.html
I have a doubt.
I want to perform certain steps after login in. But I need to enter captcha for logging in.
So how do I program the script to start running again once login button is clicked
Put a message box where captcha is expected. The execution will pause when messages box will be displayed. Manually enter captcha at this point. Once done clik on the message box. Execution will continue from that point. Synatx for message box given below:
MsgBox "Wait"
Hello Bro, how to select a specific option in website drop-down list by VBA web scraping method, and also can we able to select the drop-down based on values or words in excel. Please help
refer below tutorial:
th-cam.com/video/T6HRjiAdW38/w-d-xo.html
super
Thank you
Can you suggest me a book from where I can learn web based and excel based automations?
well I am not aware of any book as such, but there is plenty of content available online.
Let me know if interested in a training.
Hi I have a question how do I make the code to click a hyperlynk
share html of ur link
Hi
Can u plz tell me what code will be for wait untill page lode for Chrome browser
Plz tell me
I'm getting a "Variable not defined" Error, just after the loop - For intRow = 2 to 5? Any suggestions on what I am doing wrong...
did you write option explicit at the top?
Yes i started off with Option Explicit
removed it and ran run, but now I get a "run time error "438" ....Debug at "Do While IE.Busy..."
did you select Microsoft internet controls and HTML controls from Tool/References
@@AutomationMadeEasy I did...i still get error 438 ...Object doesn't support this property or method?
I am getting this error while running this code as Runtime error
Method 'Document 'of object 'Iwebbrowser2' failed . I have the add ins enabled.
Replace Set IE = CreateObject("InternetExplorer.Application") with
Set IE = New InternetExplorerMedium
Remaining code shall remain the same
How to make each row data run in seperate tab of same Browser
Thanks
Welcome
Bro. Thank you so much for explaining so well. I would like to work with you on some projects. Please contact me
write into info@automationandagile.com
Plz share your contact info
ok. I tried texting you. Seems messages are not going through. Can you try @automationandagile
Dear Sir, what is the code for "attaching files via whatsapp" using excel VBA in chrome
Not possible
Hi, I have a confusion ...While u r using Do while ..... Why 4 used.. especially Not equal 4... Please elaborate use of especially 4. Thanks advance.
4 indicates browser is loaded correctly. So we wait unil browser gets loaded successfully else subsequent steps will fail.
How can I automatically update the excel sheet data after updating the same data in website
What if we do not have calculate button?
you will have to execute from the VBA window
Bookmark: 3:30
Hi
I am using vba in chrome here I can't get .innertext
use getText()
@@AutomationMadeEasy
Thanks bro u help me a lot
Ur vedio are very informational
Thanks
Hello , i have a web page which doesn't work in IE , i need mozilla to scrape
Below tutorial may serve your purpose:
th-cam.com/video/iIhEyrYfqbA/w-d-xo.html
what if the result will be on the other web page?
you can swith to the page. Similar explanation is provided in below tutorial:
th-cam.com/video/qsU_9KVaYOU/w-d-xo.html
wha4 if the web site has authentication? like i need username and password to get into the page?
You can automate the login procedure using the same approach as explained in the tutorial and perform your tasks.
Dumb question - newbie here - TimeStamp 22:08 to 22:11 how to do that?
Aplogies for late reply. Are you talking about the "&" operator?
I'm sorry about my bad English.
How I can replace that straight link (IE.navigate "www.automationandagile.com/p/demo-page.html")
if I have already form open in IE and wanna use that open form?
I can't use that straight link because form is back of password. I have to search first correct vehicle and after that I can open form.
...in other words, address/url of the form changes every time.
Refer below tutorial:
th-cam.com/video/qsU_9KVaYOU/w-d-xo.html
I am getting 438 runtime error how to solve
at which point you are getting this error? Also what is the error dewcription
@@AutomationMadeEasy I have tried to use this method to fetch data for stock price in excel if possible make a video on it 🙏🙏🙏
Hi
I can't get innertext
Plz help
what if the form uses a name instead of an ID?
doc.findElementsByName("name of element")(0).Value = "test1457"
Automation Made Easy thanks!
Automation Made Easy I’m also stuck with another part. The button I’m wanting to use only has a input value and type... how could I use either one? Thanks again!
share the html of the button
@@AutomationMadeEasy the button html is:
and the class html is:
How to put the value if the xml page is like ""
doc.getElementsByName("query")(0).Value= "test"
@@AutomationMadeEasyThank you much, similarly how to get data from web table without ID
Sir ji suru se shikhna h yo bhi hindi me please English kam samjh aati h
training ke liye enroll kar lijiye
I'm getting a debug error on my strName line. Error says object variable or with block variable not set. Can you solve this error?
strName = doc.getElementsByClassName("view_more_summary")(0).innerText