Is VBA good for automation?

Can we automate Edge using VBA?

The process I'm working on involves scraping websites using VBA and Excel 2026.

The script would be used by a business that collects leads from the websites.

The problem is, not all websites can be scraped in the first place due to several reasons including: No X-Frame options available. Hidden elements are not loaded (eg dropdowns). Form filling with different values. So they need to be detected beforehand and avoided. This article is a good example of how I do it. So my question is, is there a way to automate Edge using VBA? Also if you know of a website that can't be scraped this way, please share. Thanks! Yes it is possible! You can use Internet Explorer automation. You can try below code. And I am assuming that your URL is dynamic and it will always change from time to time. So use this code before scraping data.

Option Explicit. Sub ScrapeData(). Dim IE As New SHDocVw.InternetExplorer 'Set URL property, which contains the URL you are interested in. Set objIE = New SHDocVw.InternetExplorer objIE.Navigate "" Do While Not objIE.Busy 'Do whatever you want to do with the data. Set objIE = objIE.parent Loop. End Sub. P.S : 1) In the code above, the objIE will be the web browser. It will take the first form on a webpage, after login. But there may be more than 1 forms in the webpage.

2) If there are multiple pages in a webpage, set the above code in subroutine that runs everyday at 2 AM and repeat it until no other pages are available.

Can you use selenium with edge?

I'm trying to write a browser-agnostic testing framework using selenium webdriver but I've hit a wall when it comes to setting up a chrome/firefox instance.

I can successfully open and use a chromium instance but after reading the docs on the selenium webdriver website, it appears that I can only open a selenium webdriver instance through chromedriver (). My issue with this is I'd have to run chromedriver each time I want to test - something I can't do as the app runs in my local machine and not on a server where chromedriver is installed. Is there any way to make a selenium webdriver instance which can work with a browser independent of where chromedriver/edge is installed? The chromedriver package has an executable named "wd", which runs selenium's webdriver: If you've managed to get your Selenium WebDriver working in a browser other than Chrome or Firefox, then most likely you're running it as a standalone executable or script rather than a plugin. In this case, you'll need to tell the webdriver where Chrome or Firefox is installed so that it can be found.

Is VBA good for automation?

Yes, No.

We're asked this question quite often at work. A co-worker will approach me about one of their projects and want to know if they should invest time in VBA coding or not? The answer is yes and no.

The Yes part. The first part of the response always comes back to my background as a developer. When I started working in my profession, I used most of my skills when making VBA code. I was the developer for all project I worked on for five years straight in my early career, and the code from them were what built me into the software developer I am today. There are things that the majority of us have not learned yet, but I'd put my VBA/VB experience above all my other coding experiences. So by now, you may have learned more than I did in my first several years of programming.

The most important thing is just because it was my first experience does not mean that it is not a valuable way to code in the industry. I wouldn't be surprised if you can write really good VBA code for most languages. What I find interesting is it could be just as effective for non-MS-specific languages.

One major factor to weigh here is if you want something that will be accessible to the public. In my experience, when a company asks for a non-visual application or non-Microsoft automation tool, my response is always yes. We can't guarantee how long your company needs to maintain this tool. If it ends up being something that people come in later to access and change, it is much more effort to rewrite it than it would have been to start fresh with a modern language and tooling. If it is used internally and not available to public, we can just use an internal API that we already know works. A lot of companies seem to fall down on having some kind of API documentation available, so they need to start documenting them from the ground up. This means creating an object that people can interact with through programming, writing documentation, and updating the code that it calls.

I have also seen a lot of companies that do not use Visual Basic but have some VBA code embedded in their products. The biggest factor in this instance, is cost. VBA code needs no development environment, and is usually pretty easy to maintain.

Related Answers

How can we use the Selenium tool with HeadSpin?

Selenium is a tool that is used to automate functional testing. There are two types...

How can we use the Selenium tool with HeadSpin?

Selenium is a cross-browser testing automation framework w...

What is Selenium Automation?

(in Plain English!) Selenium is a popular tool for automating website test...