'Excel VBA script to login to a website no longer works with Internet Explorer (IE)

I am in need of some advice rather than you looking at some of my code.

Until end of last year / early january this year I have been using several scripts with IE that would login to an external or internal website, click a few times to get to the right page, fill out some input-fields and click on a search button. Sometimes it is enough to show the actual webpage with the information and somethimes the script picks up the desired data and return it to the spreadsheet. All of those script stopt working a few weeks ago due to the fact that these scripts no longer work with IE anymore. I don’t know the technical reason behind this, but I guess you guys do.

So I have been looking for alternatives and came up with 3. Mind you I am not a professional developer and I do not have admin rights on my laptop.

  1. Use Chrome
  2. Use WinHTTP
  3. Use XMLHTTP

Ad 1) This would be the most likely alternative, but I cannot install the Selenium webdriver. Last week I asked my boss about this, but it’s simply company policy. So I have to use Chrome without Selenium which for what I read about it, is a real pain in the a.. Below some links to articles on a few websites.

How Can I Use Selenium in Excel Without SeleniumBasic? https://www.reddit.com/r/vba/comments/nnj694/can_you_automate_chrome_using_vba_without_selenium/ https://www.excelforum.com/excel-programming-vba-macros/1365781-opening-google-chrome-search-from-excel-cell-using-vba-without-selenium.html

Is there any point in trying to get a script working with Chrome and no Selenium that can do the same as my IE script ? If someone has a working script that can do the things my IE scripts can or a link to a website with a working script that would be great. Rewriting my script is something I can do myself (I hope). But for what I have read so far this doesn’t seem to be the best way.

Ad 2 and 3) A probably better solution would be to use a headless browser (I hope this is the correct word for it). That would cause a problem for one IE script but all the other IE scripts don’t really need a browser because they would only pick up some data from, mostly internal, websites.

Which one of these two (WinHTTP or XMLHTTP) would be the better choise here. And also if you have a script that works doing what my IE script does, or a link to a website with a good example would be much appreciated. From there on I will start my own research and write the code or look for solutions. I am in need of a good start.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source