{"id":5977,"date":"2023-10-18T14:47:43","date_gmt":"2023-10-18T14:47:43","guid":{"rendered":"https:\/\/royadata.io\/blog\/?p=5977"},"modified":"2023-10-18T14:47:43","modified_gmt":"2023-10-18T14:47:43","slug":"extract-website-data-by-using-excel-vba","status":"publish","type":"post","link":"http:\/\/royadata.io\/blog\/extract-website-data-by-using-excel-vba\/","title":{"rendered":"Extract Website Data from HTML to Excel using VBA [Step-by-Step Guide: HTML to Excel]"},"content":{"rendered":"<blockquote>\n<p>Are you looking for a cost-efficient way to scrape relevant website data? Excel VBA is a good pick for this. With little or no coding experience, this guide would help you learn how to launch Microsoft VBA and scrape website data into an Excel spreadsheet.<\/p>\n<\/blockquote>\n<p><picture class=\"aligncenter size-full wp-image-21444 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-300x167.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-768x426.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20555'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20555'%3E%3C\/svg%3E\" alt=\"Extracting Website Data by Using Excel VBA\" width=\"1000\" height=\"555\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-300x167.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-768x426.jpg 768w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21444\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-300x167.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-768x426.jpg.webp 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA.jpg\" alt=\"Extracting Website Data by Using Excel VBA\" width=\"1000\" height=\"555\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-300x167.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Extracting-Website-Data-by-Using-Excel-VBA-768x426.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>In this digital era, websites play major roles in our daily lives as individuals or businesses. You would agree with me that both businesses and self-employed individuals use websites to carry out transactions daily. As such, these websites serve as good sources for generating data for making informed economic, political, health, and demographic decisions. This process of extracting valuable information from websites is known as \u201cweb scraping.\u201d<\/p>\n<p>Depending on the dataset you are looking to scrape, several methods exist for collecting data from websites. One example is Excel VBA. It would interest you to know that Microsoft Excel is undoubtedly one of the most used data processing applications across various disciplines around the world.<\/p>\n<p>Whether you are a digital native or an immigrant, you have probably heard of or are familiar with the basic functions of Excel. With Microsoft Excel, you can store, organize, and manipulate data using different functions and formulas. However, one other unique use case of this application is that it allows users to access web pages to extract data from them.<\/p>\n<p>Therefore, in this article, we will be looking at the different steps involved in extracting valuable data from web pages with Excel VBA. But first, let\u2019s get to know what VBA web scraping really is.<\/p>\n<hr\/>\n<h2 id=\"what-is-vba-web-scraping\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"What_is_VBA_web_scraping\"><\/span><strong>What is VBA web scraping?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><picture class=\"aligncenter size-full wp-image-21455 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping.jpg.webp 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-768x432.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20900%20506'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 900px) 100vw, 900px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20900%20506'%3E%3C\/svg%3E\" alt=\"VBA web scraping\" width=\"900\" height=\"506\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping.jpg 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-768x432.jpg 768w\" data-sizes=\"(max-width: 900px) 100vw, 900px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21455\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping.jpg.webp 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-768x432.jpg.webp 768w\" sizes=\"(max-width: 900px) 100vw, 900px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping.jpg\" alt=\"VBA web scraping\" width=\"900\" height=\"506\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping.jpg 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-web-scraping-768x432.jpg 768w\" sizes=\"(max-width: 900px) 100vw, 900px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>VBA web scraping is a unique data scraping technique that can be used to automatically gather data from websites and export it to Excel. It\u2019s a web scraping technique that is made possible with the use of external applications such as the Microsoft Edge browser.<\/p>\n<p>However, VBA is an abbreviation for \u201cVisual Basic Application.\u201d This is essentially a Microsoft Corporation programming language. It extends the capabilities of Microsoft Office tools.<\/p>\n<p>As a result, users can utilize this Microsoft programming language to develop advanced functions and complex automation. Perhaps the core reason VBA can be used is to write macros to pull data from websites into Excel.<\/p>\n<hr\/>\n<h2 id=\"advantages-and-disadvantages-of-using-vba-for-web-scraping\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Advantages_and_disadvantages_of_using_VBA_for_web_scraping\"><\/span><strong>Advantages and disadvantages of using VBA for web scraping<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><picture class=\"aligncenter size-large wp-image-21477 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-1024x506.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-300x148.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-768x379.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping.jpg.webp 1138w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20506'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20506'%3E%3C\/svg%3E\" alt=\"pros and cons VBA for web scraping\" width=\"1024\" height=\"506\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-1024x506.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-1024x506.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-300x148.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-768x379.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping.jpg 1138w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21477\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-1024x506.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-300x148.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-768x379.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping.jpg.webp 1138w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-1024x506.jpg\" alt=\"pros and cons VBA for web scraping\" width=\"1024\" height=\"506\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-1024x506.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-300x148.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping-768x379.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/pros-and-cons-VBA-for-web-scraping.jpg 1138w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>Since we now know what VBA web scraping is, it is important to highlight some of the advantages and disadvantages of web scraping to Excel with VBA before moving on to the tutorial.<\/p>\n<ul>\n<li>\n<h3 id=\"advantages\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Advantages\"><\/span><strong>Advantages<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<\/li>\n<\/ul>\n<p><strong>1. Complete Automation:<\/strong> In Excel, you can automate almost anything you do. You don\u2019t have to sit all day in front of your computer for long, time-consuming tasks. Excel does the work while you do other things. For instance, when running the VBA script, you don\u2019t have to perform any additional tasks or even interact with the browser.<\/p>\n<p><strong>2. Reliable:<\/strong> Microsoft Excel always executes the task in the same way, so you are sure of a very accurate and consistent result every time. Also, since Microsoft Excel and VBA are developed and maintained by Microsoft, these tools can be upgraded together to the latest version without any challenge.<\/p>\n<p><strong>3. Readily Available:<\/strong> If you already have Microsoft Office installed, you won\u2019t have to install anything else. This is because VBA is a bundle that comes with Microsoft Office. You can use VBA right away in all the Microsoft Office tools.<\/p>\n<ul>\n<li>\n<h3 id=\"disadvantages\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Disadvantages\"><\/span><strong>Disadvantages<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<\/li>\n<\/ul>\n<p><strong>1. Works only in Windows: <\/strong>One downside to Excel VBA is that it doesn\u2019t have cross-platform support. It only works in a Windows environment. Also, the library&#8217;s resources are limited. As such, third-party scraping tools are hard to integrate.<\/p>\n<p><strong>2. It has a steep learning curve:<\/strong> If you must scrape data with VBA, you must learn how to write programs in VBA. However, the VBA programming language is not particularly user-friendly. It is a bit harder than other modern programming languages, such as JavaScript, Go, or Python.<strong>\u00a0<\/strong><\/p>\n<hr\/>\n<pre style=\"text-align: center;\"><strong>Guide to Extracting Website Data with Excel VBA<\/strong><\/pre>\n<p>For this guide, we will be looking at how to do VBA web scraping with both Microsoft Edge and Google Chrome.<\/p>\n<hr\/>\n<h2 id=\"requirements-for-extracting-data-with-excel-vba\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Requirements_for_extracting_data_with_Excel_VBA\"><\/span><strong>Requirements for extracting data with Excel VBA<\/strong>.<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><picture class=\"aligncenter size-full wp-image-21454 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA.jpg.webp 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-768x432.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20900%20506'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 900px) 100vw, 900px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20900%20506'%3E%3C\/svg%3E\" alt=\"extracting data with Excel VBA\" width=\"900\" height=\"506\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA.jpg 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-768x432.jpg 768w\" data-sizes=\"(max-width: 900px) 100vw, 900px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21454\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA.jpg.webp 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-768x432.jpg.webp 768w\" sizes=\"(max-width: 900px) 100vw, 900px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA.jpg\" alt=\"extracting data with Excel VBA\" width=\"900\" height=\"506\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA.jpg 900w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/extracting-data-with-Excel-VBA-768x432.jpg 768w\" sizes=\"(max-width: 900px) 100vw, 900px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>To extract website data using Excel VBA, it is essential to have certain things in place. To make the whole process easier, it is important that we install and set up all the prerequisites for this tutorial.<\/p>\n<p>So, for this guide, we would be using:<\/p>\n<ul>\n<li>Windows 11 OS.<\/li>\n<li>Microsoft 365.<\/li>\n<li>Microsoft Edge.<\/li>\n<li>Google Chrome.<\/li>\n<li>Selenium (for VBA scraping on Google Chrome).<\/li>\n<li>A Basic understanding of HMTL and CSS.<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> You can also follow this guide using any of the older versions of the Windows operating system and Microsoft Office Suite (make sure to install it if you don\u2019t have MS Office on your computer). Also, we are using the Microsoft Edge browser for this Excel VBA data extraction because the preceding Internet Explorer, which was originally compatible with this data scraping, has been discontinued by Windows.<\/p>\n<p>You should also note that extracting data using Excel VBA can be done with other browsers, which is what we will be doing. However, it would require some additional software. For instance, if you want to use Google Chrome to do VBA web scraping, you will have to install Selenium.<\/p>\n<hr\/>\n<h2 id=\"extracting-website-data-with-excel-vba-microsoft-edge\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Extracting_Website_Data_with_Excel_VBA_Microsoft_Edge\"><\/span><strong>Extracting Website Data with Excel VBA (Microsoft Edge).<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<hr\/>\n<h3 id=\"preparing-the-excel-vba-environment\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Preparing_the_Excel_VBA_environment\"><\/span><strong>Preparing the Excel VBA environment<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>With all the requirements in place, follow the steps below to set up the development environment in Excel. This is to enable the <strong>developer<\/strong> ribbon that gives users access to VBA.<\/p>\n<ul>\n<li>Open Microsoft Excel. Tap the Windows key on your keyboard to get quick access to your applications. If you&#8217;ve been using Microsoft Excel, it&#8217;ll be listed under the pinned applications. If it&#8217;s not there, go ahead and click All Apps in the top-right corner. Scroll down to locate Microsoft Excel and click it to open. When it opens, you would see an interface like the one below:<\/li>\n<\/ul>\n<p><picture class=\"aligncenter size-large wp-image-21297 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" alt=\"Open process of MS Excel\" width=\"1024\" height=\"576\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21297\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-1024x576.jpg\" alt=\"Open process of MS Excel\" width=\"1024\" height=\"576\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Open-process-of-MS-Excel.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>Go ahead to click the <strong>File<\/strong> ribbon.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21298 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon.jpg.webp 737w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon-300x46.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20737%20114'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 737px) 100vw, 737px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20737%20114'%3E%3C\/svg%3E\" alt=\"Ahead to click the File ribbon\" width=\"737\" height=\"114\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon.jpg 737w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon-300x46.jpg 300w\" data-sizes=\"(max-width: 737px) 100vw, 737px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21298\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon.jpg.webp 737w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon-300x46.jpg.webp 300w\" sizes=\"(max-width: 737px) 100vw, 737px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon.jpg\" alt=\"Ahead to click the File ribbon\" width=\"737\" height=\"114\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon.jpg 737w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Ahead-to-click-the-File-ribbon-300x46.jpg 300w\" sizes=\"(max-width: 737px) 100vw, 737px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<ul>\n<li>Enable the <strong>developer<\/strong> ribbon. Obviously, Microsoft Excel wouldn\u2019t show the <strong>developer<\/strong> ribbon by default. You would have to enable it manually. So, after clicking the file ribbon, scroll down to the last option in the sidebar, <strong>More\u2026<\/strong><\/li>\n<\/ul>\n<p><picture class=\"aligncenter size-full wp-image-21331 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Show-the-developer-ribbon-by-default.jpg.webp\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20171%20178'%3E%3C\/svg%3E\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20171%20178'%3E%3C\/svg%3E\" alt=\"Show the developer ribbon by default\" width=\"171\" height=\"178\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Show-the-developer-ribbon-by-default.jpg\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21331\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Show-the-developer-ribbon-by-default.jpg.webp\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Show-the-developer-ribbon-by-default.jpg\" alt=\"Show the developer ribbon by default\" width=\"171\" height=\"178\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>When you click it, you will see two more options: <strong>Feedback<\/strong> and <strong>Options. <\/strong>Click on <strong>Options<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21312 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options.jpg.webp 327w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options-300x140.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20327%20153'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 327px) 100vw, 327px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20327%20153'%3E%3C\/svg%3E\" alt=\"Feedback and Options\" width=\"327\" height=\"153\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options.jpg 327w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options-300x140.jpg 300w\" data-sizes=\"(max-width: 327px) 100vw, 327px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21312\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options.jpg.webp 327w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options-300x140.jpg.webp 300w\" sizes=\"(max-width: 327px) 100vw, 327px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options.jpg\" alt=\"Feedback and Options\" width=\"327\" height=\"153\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options.jpg 327w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Feedback-and-Options-300x140.jpg 300w\" sizes=\"(max-width: 327px) 100vw, 327px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<ul>\n<li>Select the<strong> Customize Ribbon <\/strong>option<strong>.<\/strong> Once you click options, a dialog box will pop up. From the side menu, select <strong>Customize Ribbon<\/strong>.<\/li>\n<\/ul>\n<p><picture class=\"aligncenter size-large wp-image-21326 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-1024x543.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-300x159.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-768x407.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20543'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20543'%3E%3C\/svg%3E\" alt=\"Select the Customize Ribbon option\" width=\"1024\" height=\"543\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-1024x543.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-1024x543.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-300x159.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-768x407.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21326\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-1024x543.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-300x159.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-768x407.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-1024x543.jpg\" alt=\"Select the Customize Ribbon option\" width=\"1024\" height=\"543\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-1024x543.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-300x159.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option-768x407.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Customize-Ribbon-option.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<ul>\n<li>Click on the check box beside <strong>developer. <\/strong>After confirming the check box has been clicked, you can then click <strong>OK<\/strong>.<\/li>\n<\/ul>\n<p><picture class=\"aligncenter size-large wp-image-21305 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-1024x539.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-300x158.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-768x404.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20539'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20539'%3E%3C\/svg%3E\" alt=\"Click on the check box beside developer\" width=\"1024\" height=\"539\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-1024x539.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-1024x539.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-300x158.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-768x404.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21305\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-1024x539.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-300x158.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-768x404.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-1024x539.jpg\" alt=\"Click on the check box beside developer\" width=\"1024\" height=\"539\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-1024x539.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-300x158.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer-768x404.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-the-check-box-beside-developer.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>You should now see the <strong>developer<\/strong> ribbon on the menu bar, as shown in the image below.<\/p>\n<p><picture class=\"aligncenter size-large wp-image-21310 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-1024x94.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-300x28.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-768x71.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%2094'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%2094'%3E%3C\/svg%3E\" alt=\"Developer ribbon on the menu bar\" width=\"1024\" height=\"94\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-1024x94.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-1024x94.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-300x28.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-768x71.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21310\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-1024x94.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-300x28.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-768x71.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-1024x94.jpg\" alt=\"Developer ribbon on the menu bar\" width=\"1024\" height=\"94\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-1024x94.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-300x28.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar-768x71.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Developer-ribbon-on-the-menu-bar.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<ul>\n<li>Add a new Module and References. After activating the above VBA ribbon, we would need to insert a new Module and references. To do this, click the <strong>developer<\/strong> ribbon we just activated to open the Visual Basic application. Select <strong>Visual Basic<\/strong> to start the process.<\/li>\n<\/ul>\n<p><picture class=\"aligncenter size-large wp-image-21306 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-1024x140.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-300x41.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-768x105.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20140'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20140'%3E%3C\/svg%3E\" alt=\"Click the developer ribbon at the top\" width=\"1024\" height=\"140\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-1024x140.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-1024x140.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-300x41.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-768x105.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21306\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-1024x140.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-300x41.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-768x105.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-1024x140.jpg\" alt=\"Click the developer ribbon at the top\" width=\"1024\" height=\"140\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-1024x140.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-300x41.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top-768x105.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-the-developer-ribbon-at-the-top.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>To add a new Module, you would see a new window open, as demonstrated below. This is after you have clicked <strong>Visual Basic<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-large wp-image-21307 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" alt=\"Clicked Visual Basic\" width=\"1024\" height=\"576\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21307\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-1024x576.jpg\" alt=\"Clicked Visual Basic\" width=\"1024\" height=\"576\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicked-Visual-Basic.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 1:<\/strong> Click on <strong>Insert<\/strong> on the menu, scroll down, and then click <strong>Module<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21304 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu.jpg.webp 320w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu-300x221.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20320%20236'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 320px) 100vw, 320px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20320%20236'%3E%3C\/svg%3E\" alt=\"Click on Insert on the menu\" width=\"320\" height=\"236\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu.jpg 320w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu-300x221.jpg 300w\" data-sizes=\"(max-width: 320px) 100vw, 320px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21304\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu.jpg.webp 320w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu-300x221.jpg.webp 300w\" sizes=\"(max-width: 320px) 100vw, 320px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu.jpg\" alt=\"Click on Insert on the menu\" width=\"320\" height=\"236\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu.jpg 320w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-Insert-on-the-menu-300x221.jpg 300w\" sizes=\"(max-width: 320px) 100vw, 320px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 2:<\/strong> The new Module should look like this:<\/p>\n<p><picture class=\"aligncenter size-large wp-image-21321 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look-.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" alt=\"New Module should look\" width=\"1024\" height=\"576\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look-.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21321\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look-.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--1024x576.jpg\" alt=\"New Module should look\" width=\"1024\" height=\"576\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look--768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/New-Module-should-look-.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>To add new references, select <strong>Tools<\/strong> from the top menu. Pick the first option: <strong>References<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21328 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu.jpg.webp 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu-300x134.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20566%20253'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 566px) 100vw, 566px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20566%20253'%3E%3C\/svg%3E\" alt=\"Select Tools from the top menu\" width=\"566\" height=\"253\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu.jpg 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu-300x134.jpg 300w\" data-sizes=\"(max-width: 566px) 100vw, 566px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21328\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu.jpg.webp 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu-300x134.jpg.webp 300w\" sizes=\"(max-width: 566px) 100vw, 566px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu.jpg\" alt=\"Select Tools from the top menu\" width=\"566\" height=\"253\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu.jpg 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Tools-from-the-top-menu-300x134.jpg 300w\" sizes=\"(max-width: 566px) 100vw, 566px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 3:<\/strong> When you click References, a new window will open like the one below. Check the boxes for <strong>Microsoft HTML Object Library<\/strong> and <strong>Microsoft Internet Controls<\/strong> from the list of available references. When you reference these two files in the Module, it will help in opening Microsoft Edge when you set it up. Once you are done checking the boxes, click <strong>OK<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21320 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls-.jpg.webp 464w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls--300x250.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20464%20387'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 464px) 100vw, 464px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20464%20387'%3E%3C\/svg%3E\" alt=\"Microsoft HTML Object Library and Microsoft Internet Controls\" width=\"464\" height=\"387\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls-.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls-.jpg 464w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls--300x250.jpg 300w\" data-sizes=\"(max-width: 464px) 100vw, 464px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21320\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls-.jpg.webp 464w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls--300x250.jpg.webp 300w\" sizes=\"(max-width: 464px) 100vw, 464px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls-.jpg\" alt=\"Microsoft HTML Object Library and Microsoft Internet Controls\" width=\"464\" height=\"387\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls-.jpg 464w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-HTML-Object-Library-and-Microsoft-Internet-Controls--300x250.jpg 300w\" sizes=\"(max-width: 464px) 100vw, 464px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 4:<\/strong> Initialize a new subroutine. This is the sub-procedure for VBA web scraping. Type in the following code in the Module as seen below:<\/p>\n<p><strong>Note:<\/strong> You can do this before or after selecting your references. Either way, it would work.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Sub VBA_Web_Scraping ()\n\n\n\nEnd Sub<\/pre>\n<p><picture class=\"aligncenter wp-image-21330 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" alt=\"Selecting your References Code\" width=\"1000\" height=\"562\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code.jpg 1366w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21330\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code.jpg.webp 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-1024x576.jpg\" alt=\"Selecting your References Code\" width=\"1000\" height=\"562\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Selecting-your-References-Code.jpg 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>That\u2019s all you to set up the development environment. The next step would be to automate Microsoft Edge so it can open a web page.<\/p>\n<hr\/>\n<h2 id=\"automating-microsoft-edge-to-open-a-website\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Automating_Microsoft_Edge_to_Open_a_website\"><\/span><strong>Automating Microsoft Edge to Open a website. <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before getting into the automation of Microsoft Edge, it is essential to note that Excel VBA initially supported only Internet Explorer-based automation. However, Microsoft discontinued Internet Explorer in July 2022. They did, however, release some updates that enabled the InternetExplorer module to run the Microsoft Edge browser in IE mode.<\/p>\n<p>So, do not be surprised when we write \u201cInternet Explorer\u201d to interact with the Microsoft Edge browser. Besides, the codes we would be writing in the guide are also compatible with older versions of Windows that have Internet Explorer.<\/p>\n<hr\/>\n<h2 id=\"opening-microsoft-edge-using-excel-vba\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Opening_Microsoft_Edge_using_Excel_VBA\"><\/span><strong>Opening Microsoft Edge using Excel VBA.<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>All right, it\u2019s time to update our Module so that the Edge browser can open a website. For this tutorial, we would be opening <a href=\"https:\/\/www.iban.com\/country-codes\"  rel=\"noopener noreferrer nofollow\">https:\/\/www.iban.com\/country-codes<\/a>. The steps are as follows:<\/p>\n<p><strong>Step 1:<\/strong> Having activated the internet controls, we would insert the inputs and declare the necessary objects using the code below. You should know that if you haven&#8217;t set up your reference, you won\u2019t be able to see <strong>Internet Explorer<\/strong>. So, if you have not done that, you can refer to the section above to do that quickly.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code-2\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Sub VBA_Web_Scraping ()\n\n\n\nDim ie As Object\n\n\n\nDim url As String\n\n\n\nurl = \u201c<a href=\"https:\/\/www.iban.com\/country-codes\"  rel=\"noopener noreferrer nofollow\">https:\/\/www.iban.com\/country-codes<\/a>\u201d\n\n\n\nEnd Sub<\/pre>\n<p><picture class=\"aligncenter wp-image-21315 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" alt=\"Internet Explorer Module Coding\" width=\"1000\" height=\"562\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding.jpg 1366w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21315\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding.jpg.webp 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-1024x576.jpg\" alt=\"Internet Explorer Module Coding\" width=\"1000\" height=\"562\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Internet-Explorer-Module-Coding.jpg 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 2:<\/strong> In the above code, we have defined a subroutine called <strong>VBA_Web_Scraping(). <\/strong>We have also defined two objects inside the subroutine: the <strong>ie<\/strong> and the <strong>URL. <\/strong>The code also shows the <strong>website address<\/strong> from which we want to scrape data.<\/p>\n<p><strong>Step 3:<\/strong> To make sure that VBA opens Microsoft Edge in IE Mode and navigates the website, add the following set of codes with reference to the website address we have already input.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code-3\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Set ie = CreateObject(\"InternetExplorer.Application\")\n\n\n\nie.Visible = True\n\n\n\nie.navigate url<\/pre>\n<p><picture class=\"aligncenter wp-image-21316 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" alt=\"InternetExplorer Application Coding\" width=\"1000\" height=\"562\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding.jpg 1366w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21316\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding.jpg.webp 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-1024x576.jpg\" alt=\"InternetExplorer Application Coding\" width=\"1000\" height=\"562\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/InternetExplorer-Application-Coding.jpg 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>In the code we just wrote, the <strong>ie<\/strong> object gives us access to Microsoft Edge. Another thing you would notice is that the browser has been set to be visible so we can see what is happening (<strong>ie.Visible = True<\/strong>). This is not a must but it can be very helpful especially if you want to inspect the HTML code of the website you are scraping.<\/p>\n<hr\/>\n<h2 id=\"opening-a-website-in-microsoft-edge-using-vba\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Opening_a_website_in_Microsoft_Edge_using_VBA\"><\/span><strong>Opening a website in Microsoft Edge using VBA<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In the previous section, we demonstrated how to open a website using VBA. When you check the last set of codes, we have used the <strong>ie.navigate()<\/strong> function to tell the VBA browser to open the URL we have input. You should see a pop-up like the one below in Internet Explorer. You are free to maximize the browser so that you can navigate properly.<\/p>\n<p><picture class=\"aligncenter wp-image-21319 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA.jpg.webp 1005w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-300x184.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-768x471.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20613'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20613'%3E%3C\/svg%3E\" alt=\"Microsoft Edge using VBA\" width=\"1000\" height=\"613\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA.jpg 1005w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-300x184.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-768x471.jpg 768w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21319\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA.jpg.webp 1005w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-300x184.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-768x471.jpg.webp 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA.jpg\" alt=\"Microsoft Edge using VBA\" width=\"1000\" height=\"613\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA.jpg 1005w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-300x184.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Microsoft-Edge-using-VBA-768x471.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>So, the browser is ready for you to inspect the HTML code of the target website.<\/p>\n<p><strong>Scrape data from a website using VBA. <\/strong><\/p>\n<p>We would now proceed with the proper data scraping. To do that, follow the steps below.<\/p>\n<p><strong>Step 1:<\/strong> Examine the website that you wish to scrape. Nevertheless, some familiarity with HTML and web programming is necessary. However, because website structure changes so frequently, this is a good online scraping technique.<\/p>\n<p>To inspect the webpage, <strong>right-click<\/strong> on the page element you want to extract data from. In our case, we want to extract the table data. After right-clicking, select <strong>Inspect element<\/strong>. On the inspection window, you should be able to see the data structure, like the <strong>class<\/strong>, <strong>name,<\/strong> and even <strong>tag<\/strong> of the data. Make sure to pay attention to this set of information because you will need it when you start writing the VBA code to scrape the data.<\/p>\n<p><picture class=\"aligncenter wp-image-21324 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-1024x611.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-300x179.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-768x458.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element.jpg.webp 1220w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20597'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20597'%3E%3C\/svg%3E\" alt=\"Select Inspect element\" width=\"1000\" height=\"597\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-1024x611.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-1024x611.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-300x179.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-768x458.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element.jpg 1220w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21324\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-1024x611.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-300x179.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-768x458.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element.jpg.webp 1220w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-1024x611.jpg\" alt=\"Select Inspect element\" width=\"1000\" height=\"597\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-1024x611.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-300x179.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element-768x458.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Inspect-element.jpg 1220w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>You should see the InternetExplorer dev tools tab at the bottom with the page\u2019s codes.<\/p>\n<p><picture class=\"aligncenter wp-image-21317 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-1024x561.jpg.webp 1024w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-300x164.jpg.webp 300w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-768x421.jpg.webp 768w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes.jpg.webp 1307w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20548'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20548'%3E%3C\/svg%3E\" alt=\"InternetExplorer dev tools tab at the bottom with the page\u2019s codes\" width=\"1000\" height=\"548\" data-src=\"https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-1024x561.jpg\" data-srcset=\"https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-1024x561.jpg 1024w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-300x164.jpg 300w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-768x421.jpg 768w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes.jpg 1307w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21317\"><source type=\"image\/webp\" srcset=\"https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-1024x561.jpg.webp 1024w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-300x164.jpg.webp 300w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-768x421.jpg.webp 768w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes.jpg.webp 1307w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-1024x561.jpg\" alt=\"InternetExplorer dev tools tab at the bottom with the page\u2019s codes\" width=\"1000\" height=\"548\" srcset=\"https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-1024x561.jpg 1024w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-300x164.jpg 300w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes-768x421.jpg 768w, https:\/\/www.bestproxyreviews.com\/wp-content\/uploads\/2023\/01\/InternetExplorer-dev-tools-tab-at-the-bottom-with-the-page\u2019s-codes.jpg 1307w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 2:<\/strong> Add the <strong>Do While<\/strong>, <strong>Do Events<\/strong>, and <strong>Do Until<\/strong> VBA loops. These would cause a brief pause to allow the web page to load properly. It would force the Macro to wait until the target page enters <strong>Ready State Complete<\/strong> mode.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code-4\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Do While ie.Busy: DoEvents: Loop\n\n\n\nDo Until ie.readyState = 4: DoEvents: Loop<\/pre>\n<p><picture class=\"aligncenter wp-image-21332 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" alt=\"VBA Web Scraping Coding\" width=\"1000\" height=\"562\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding.jpg 1366w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21332\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding.jpg.webp 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-1024x576.jpg\" alt=\"VBA Web Scraping Coding\" width=\"1000\" height=\"562\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-Coding.jpg 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 3:<\/strong> To extract the table data, write the following code below.<\/p>\n<p>The next line of code is targeted at scraping the table data. First, we will declare the HTML elements with a variable <strong>tbl<\/strong>. We would also set it to fetch the data of the specific table using the <strong>getElementById<\/strong> method. If you look closely at this VBA method, we are scraping via a CSS Id selector.<\/p>\n<p>Scraping HTML table data or any other desired content from a web page by a CSS Id selector is much easier than scraping by a class selector. This is because the Id selector is unique to any element it is assigned to.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code-5\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Dim tbl As HTMLTable\n\n\n\nSet tbl = ie.document.getElementById(\"myTable\")\n\n\n\nAt this point, we are ready to send that table data to our worksheet.\n\n\n\nNext, we would set two variables that would represent our worksheet column and row.<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Code-6\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Dim rowCounter As Integer\n\n\n\nDim colCounter As Integer\n\n\n\nrowCounter = 1\n\n\n\ncolCounter = 1<\/pre>\n<p>Now, we would declare the table elements again, but this time it would be the <strong>tr<\/strong>, <strong>td,<\/strong> etc. Make sure to re-inspect the HTML code of the table to capture all the necessary elements.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code-7\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Dim tr As HTMLTableRow\n\n\n\nDim td As HTMLTableCell\n\n\n\nDim th<\/pre>\n<p>We would declare our worksheet quickly to get that out of the way. Notice that we have declared our worksheet as <strong>mysh<\/strong>. However, the mysh would also be set as the name of our worksheet, in this case, <strong>VBA_Web_Scraping<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21333 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note.jpg.webp 502w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note-300x45.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20502%2075'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 502px) 100vw, 502px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20502%2075'%3E%3C\/svg%3E\" alt=\"VBA Web Scraping excel note\" width=\"502\" height=\"75\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note.jpg 502w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note-300x45.jpg 300w\" data-sizes=\"(max-width: 502px) 100vw, 502px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21333\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note.jpg.webp 502w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note-300x45.jpg.webp 300w\" sizes=\"(max-width: 502px) 100vw, 502px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note.jpg\" alt=\"VBA Web Scraping excel note\" width=\"502\" height=\"75\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note.jpg 502w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/VBA-Web-Scraping-excel-note-300x45.jpg 300w\" sizes=\"(max-width: 502px) 100vw, 502px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>Note, when you start up VBA, your worksheet name would be sheet1, sheet2, etc. You can go to change the name by double-clicking or using it like that in default.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code-8\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>Dim mysh As Worksheet\n\n\n\nSet mysh = ThisWorkbook.Sheets(\"Web Scraping\")<\/pre>\n<p>Lastly, input the lines of code below to access the content of the table.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Code-9\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>For Each tr In tbl.getElementsByTagName(\"tr\")\n\n\n\n'Loop through table header.\n\n\n\n\u00a0\u00a0 For Each th In tr.getElementsByTagName(\"th\")\n\n\n\n\u00a0\u00a0\u00a0 mysh.Cells(rowCounter, colCounter).Value = th.innerText\n\n\n\n\u00a0\u00a0\u00a0 colCounter = colCounter + 1\n\n\n\n\u00a0\u00a0 Next th\n\n<picture class=\"aligncenter wp-image-21314 perfmatters-lazy\" loading=\"lazy\">\n<source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/>\n<img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20562'%3E%3C\/svg%3E\" alt=\"Integer Module Coding\" width=\"1000\" height=\"562\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding.jpg 1366w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21314\">\n<source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding.jpg.webp 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-1024x576.jpg\" alt=\"Integer Module Coding\" width=\"1000\" height=\"562\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Integer-Module-Coding.jpg 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript>\n\n<picture class=\"aligncenter size-large wp-image-21318 perfmatters-lazy\" loading=\"lazy\">\n<source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\n<img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20576'%3E%3C\/svg%3E\" alt=\"Loop through table Cells\" width=\"1024\" height=\"576\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21318\">\n<source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-1024x576.jpg\" alt=\"Loop through table Cells\" width=\"1024\" height=\"576\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Loop-through-table-Cells.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript>\n\n'Loop through table cells.\n\n\n\n\u00a0\u00a0\u00a0 For Each td In tr.getElementsByTagName(\"td\")\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 mysh.Cells(rowCounter, colCounter).Value = td.innerText\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 colCounter = colCounter + 1\n\n\n\n\u00a0\u00a0\u00a0 Next td\n\n\n\n\u00a0\u00a0\u00a0 colCounter = 1\n\n\n\n\u00a0\u00a0\u00a0 rowCounter = rowCounter + 1\n\n\n\nNext tr\n\n\n\nThe complete VBA code would look like this:\n\n\n\nSub VBA_Web_Scraping()\n\n\n\nDim ie As Object\n\n\n\nDim url As String\n\n\n\nurl = \"https:\/\/www.iban.com\/country-codes\"\n\n\n\nSet ie = CreateObject(\"InternetExplorer.Application\")\n\n\n\nie.Visible = True\n\n\n\nie.navigate url\n\n\n\nDo While ie.Busy: DoEvents: Loop\n\n\n\nDo Until ie.readyState = 4: DoEvents: Loop\n\n\n\n'Declaring the table elements.\n\n\n\nDim tbl As HTMLTable\n\n\n\nSet tbl = ie.document.getElementById(\"myTable\")\n\n\n\n'Declaring variables for our worksheet column and roll.\n\n\n\nDim rowCounter As Integer\n\n\n\nDim colCounter As Integer\n\n\n\nrowCounter = 1\n\n\n\ncolCounter = 1\n\n\n\n'Dclaring the table elements again.\n\n\n\nDim tr As HTMLTableRow\n\n\n\nDim td As HTMLTableCell\n\n\n\nDim th\n\n\n\nDim mysh As Worksheet\n\n\n\nSet mysh = ThisWorkbook.Sheets(\"VBA_Web_Scraping\")\n\n\n\nFor Each tr In tbl.getElementsByTagName(\"tr\")\n\n\n\n'Loop through table header.\n\n\n\n\u00a0\u00a0 For Each th In tr.getElementsByTagName(\"th\")\n\n\n\n\u00a0\u00a0\u00a0 mysh.Cells(rowCounter, colCounter).Value = th.innerText\n\n\n\n\u00a0\u00a0\u00a0 colCounter = colCounter + 1\n\n\n\n\u00a0\u00a0 Next th\n\n\n\n'Loop through table cells.\n\n\n\n\u00a0\u00a0\u00a0 For Each td In tr.getElementsByTagName(\"td\")\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 mysh.Cells(rowCounter, colCounter).Value = td.innerText\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 colCounter = colCounter + 1\n\n\n\n\u00a0\u00a0\u00a0 Next td\n\n\n\n\u00a0\u00a0\u00a0 colCounter = 1\n\n\n\n\u00a0\u00a0\u00a0 rowCounter = rowCounter + 1\n\n\n\nNext tr\n\n\n\nEnd Sub<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Output\"><\/span><strong>Output<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>When you are done writing your code, press <strong>F5<\/strong> or click on the green play button to run your code.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21311 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code.jpg.webp 739w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code-300x52.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20739%20128'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 739px) 100vw, 739px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20739%20128'%3E%3C\/svg%3E\" alt=\"F5 or click on the green play button to run your code\" width=\"739\" height=\"128\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code.jpg 739w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code-300x52.jpg 300w\" data-sizes=\"(max-width: 739px) 100vw, 739px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21311\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code.jpg.webp 739w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code-300x52.jpg.webp 300w\" sizes=\"(max-width: 739px) 100vw, 739px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code.jpg\" alt=\"F5 or click on the green play button to run your code\" width=\"739\" height=\"128\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code.jpg 739w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/F5-or-click-on-the-green-play-button-to-run-your-code-300x52.jpg 300w\" sizes=\"(max-width: 739px) 100vw, 739px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>The outcome of the scraped data should look like the image below in your worksheet.<\/p>\n<p><picture class=\"aligncenter wp-image-21323 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1536x864.jpg.webp 1536w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet.jpg.webp 1600w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20563'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20563'%3E%3C\/svg%3E\" alt=\"Scraped data should look like the image below in your worksheet\" width=\"1000\" height=\"563\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1024x576.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1536x864.jpg 1536w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet.jpg 1600w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21323\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1024x576.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-300x169.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-768x432.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1536x864.jpg.webp 1536w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet.jpg.webp 1600w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1024x576.jpg\" alt=\"Scraped data should look like the image below in your worksheet\" width=\"1000\" height=\"563\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1024x576.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-300x169.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-768x432.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet-1536x864.jpg 1536w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Scraped-data-should-look-like-the-image-below-in-your-worksheet.jpg 1600w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<hr\/>\n<h2 id=\"extracting-website-data-with-excel-vba-google-chrome\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Extracting_Website_Data_with_Excel_VBA_Google_Chrome\"><\/span><strong>Extracting Website Data with Excel VBA (Google Chrome).<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The first step to scraping website data using Excel VBA and Google Chrome is to install the Selenium library. To do that, follow the brief steps below.<\/p>\n<h3 id=\"installing-selenium\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Installing_Selenium\"><\/span><strong>Installing Selenium.<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Step 1:<\/strong> Visit the GitHub website <a href=\"https:\/\/github.com\/florentbr\/SeleniumBasic\/releases\"  rel=\"noopener noreferrer nofollow\">here<\/a>.<\/p>\n<p><strong>Step 2:<\/strong> Click on the executable file to download it.<\/p>\n<p><strong>Step 3:<\/strong> After downloading, double-click it to start installing <strong>SeleniumBasic-2.0.9.0.exe<\/strong>.<\/p>\n<p><strong>Step 4:<\/strong> Click <strong>Next<\/strong> when the setup window pops up.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21302 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up.jpg.webp 562w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up-300x234.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20562%20438'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 562px) 100vw, 562px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20562%20438'%3E%3C\/svg%3E\" alt=\"Click Next when the setup window pops up\" width=\"562\" height=\"438\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up.jpg 562w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up-300x234.jpg 300w\" data-sizes=\"(max-width: 562px) 100vw, 562px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21302\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up.jpg.webp 562w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up-300x234.jpg.webp 300w\" sizes=\"(max-width: 562px) 100vw, 562px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up.jpg\" alt=\"Click Next when the setup window pops up\" width=\"562\" height=\"438\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up.jpg 562w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Next-when-the-setup-window-pops-up-300x234.jpg 300w\" sizes=\"(max-width: 562px) 100vw, 562px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 5:<\/strong> Read the license agreement carefully and select <strong>I accept the agreement<\/strong> if you are fine with it. You can click <strong>Next<\/strong> to move forward.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21301 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward.jpg.webp 565w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward-300x233.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20565%20438'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 565px) 100vw, 565px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20565%20438'%3E%3C\/svg%3E\" alt=\"click Next to move forward\" width=\"565\" height=\"438\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward.jpg 565w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward-300x233.jpg 300w\" data-sizes=\"(max-width: 565px) 100vw, 565px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21301\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward.jpg.webp 565w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward-300x233.jpg.webp 300w\" sizes=\"(max-width: 565px) 100vw, 565px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward.jpg\" alt=\"click Next to move forward\" width=\"565\" height=\"438\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward.jpg 565w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/click-Next-to-move-forward-300x233.jpg 300w\" sizes=\"(max-width: 565px) 100vw, 565px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 6:<\/strong> A marked drop-down option would appear in the next window. Click on it and select <strong>Compact installation<\/strong> out of the three options of <strong>Full installation,\u00a0Compact installation, <\/strong>and<strong> Custom installation. <\/strong>After making your selection, click <strong>Next.<\/strong><\/p>\n<p><picture class=\"aligncenter size-full wp-image-21309 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation.jpg.webp 512w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation-300x237.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20512%20405'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 512px) 100vw, 512px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20512%20405'%3E%3C\/svg%3E\" alt=\"Compact installation\" width=\"512\" height=\"405\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation.jpg 512w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation-300x237.jpg 300w\" data-sizes=\"(max-width: 512px) 100vw, 512px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21309\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation.jpg.webp 512w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation-300x237.jpg.webp 300w\" sizes=\"(max-width: 512px) 100vw, 512px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation.jpg\" alt=\"Compact installation\" width=\"512\" height=\"405\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation.jpg 512w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Compact-installation-300x237.jpg 300w\" sizes=\"(max-width: 512px) 100vw, 512px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 7:<\/strong> After clicking next, the window that comes up afterward would display the <strong>path (C:\\Users\\jonah\\AppData\\Local\\SeleniumBasic)<\/strong> of the installation folder. Please be sure to write it down or memorize it because you will need it later. Click <strong>Install<\/strong> to install Selenium on your computer.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21300 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer.jpg.webp 518w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer-300x234.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20518%20404'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 518px) 100vw, 518px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20518%20404'%3E%3C\/svg%3E\" alt=\"Click Install to install Selenium on your computer\" width=\"518\" height=\"404\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer.jpg 518w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer-300x234.jpg 300w\" data-sizes=\"(max-width: 518px) 100vw, 518px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21300\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer.jpg.webp 518w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer-300x234.jpg.webp 300w\" sizes=\"(max-width: 518px) 100vw, 518px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer.jpg\" alt=\"Click Install to install Selenium on your computer\" width=\"518\" height=\"404\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer.jpg 518w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-Install-to-install-Selenium-on-your-computer-300x234.jpg 300w\" sizes=\"(max-width: 518px) 100vw, 518px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 8:<\/strong> Finally, click <strong>Finish<\/strong> to complete the Selenium installation process.<\/p>\n<p>That\u2019s it; you are done with the installation of Selenium. However, we need to also download the <strong>ChromeDriver.<\/strong><\/p>\n<hr\/>\n<h2 id=\"downloading-the-chromedriver\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Downloading_the_ChromeDriver\"><\/span><strong>Downloading the ChromeDriver<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To download the <strong>ChromeDriver,<\/strong> you need to know your Google Chrome browser version.<\/p>\n<p><strong>Step 1:<\/strong> To check your Chrome version, click on the three-dot button on the top-right corner of your Google Chrome browser.<\/p>\n<p><strong>Step 2:<\/strong> Scroll down the drop-down list and click <strong>Help.<\/strong><\/p>\n<p><strong>Step 3:<\/strong> Another drop-down list would appear. Click on <strong>About Google Chrome<\/strong> to see your browser version.<\/p>\n<p><picture class=\"aligncenter wp-image-21303 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-1024x426.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-300x125.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-768x319.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20416'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20416'%3E%3C\/svg%3E\" alt=\"Click on About Google Chrome to see your browser version\" width=\"1000\" height=\"416\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-1024x426.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-1024x426.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-300x125.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-768x319.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version.jpg 1366w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21303\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-1024x426.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-300x125.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-768x319.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version.jpg.webp 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-1024x426.jpg\" alt=\"Click on About Google Chrome to see your browser version\" width=\"1000\" height=\"416\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-1024x426.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-300x125.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version-768x319.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Click-on-About-Google-Chrome-to-see-your-browser-version.jpg 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>You should now see your Chrome browser version as shown below.<\/p>\n<p><picture class=\"aligncenter wp-image-21299 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-1024x524.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-300x154.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-768x393.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown.jpg.webp 1186w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20512'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20512'%3E%3C\/svg%3E\" alt=\"Chrome browser version as shown\" width=\"1000\" height=\"512\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-1024x524.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-1024x524.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-300x154.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-768x393.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown.jpg 1186w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter wp-image-21299\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-1024x524.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-300x154.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-768x393.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown.jpg.webp 1186w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-1024x524.jpg\" alt=\"Chrome browser version as shown\" width=\"1000\" height=\"512\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-1024x524.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-300x154.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown-768x393.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Chrome-browser-version-as-shown.jpg 1186w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<ul>\n<li>Now that you know your Google Chrome version, go to the Chrome Driver website <a href=\"https:\/\/chromedriver.chromium.org\/downloads\"  rel=\"noopener noreferrer nofollow\">here<\/a> to download it. Make sure to download the <strong>Chrome Driver<\/strong>\u00a0according to your browser version.<\/li>\n<li>You\u2019ll be led to the download link. You&#8217;ll notice that the <strong>ChromeDriver<\/strong> is available for both Windows and Mac. Pick the one that suits your operating system\u2014in our case, we are going with Windows.<\/li>\n<li>After downloading, look for the file in your download folder or any other location you&#8217;ve designated for your downloaded documents. It would be in a zip file. Right-click it and select <strong>Extract to chromedriver_win32<\/strong> to unzip it. A folder would be created with that name.<\/li>\n<li>Open that new folder and select the executable file you see there. Copy the file by pressing <strong>Ctrl + C.<\/strong><\/li>\n<li>Remember the path where the Selenium was installed? Navigate there to paste the \u201cChrome Driver\u201d by pressing <strong>Ctrl + V.<\/strong><\/li>\n<\/ul>\n<p>Great! Your Selenium is ready for referencing in Excel VBA.<\/p>\n<hr\/>\n<h2 id=\"how-to-refer-to-the-selenium-library-in-vba\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"How_to_Refer_to_the_Selenium_Library_in_VBA\"><\/span><strong>How to Refer to the Selenium Library in VBA<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To refer to the Selenium Library in VBA, follow these steps:<\/p>\n<p><strong>Step 1:<\/strong> Open Microsoft Excel on your computer and click the <strong>developer<\/strong> ribbon at the top. After that, select <strong>Visual Basic<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-large wp-image-21329 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-1024x140.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-300x41.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-768x105.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process.jpg.webp 1366w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20140'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201024%20140'%3E%3C\/svg%3E\" alt=\"Select Visual Basic to start the process\" width=\"1024\" height=\"140\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-1024x140.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-1024x140.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-300x41.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-768x105.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process.jpg 1366w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-large wp-image-21329\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-1024x140.jpg.webp 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-300x41.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-768x105.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process.jpg.webp 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-1024x140.jpg\" alt=\"Select Visual Basic to start the process\" width=\"1024\" height=\"140\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-1024x140.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-300x41.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process-768x105.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-Visual-Basic-to-start-the-process.jpg 1366w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 2:<\/strong> The VBE (Visual Basic Editor) window would open immediately. After that, click <strong>Tools<\/strong>, followed by <strong>References <\/strong>to refer to the Selenium library.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21313 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library.jpg.webp 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library-300x134.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20566%20253'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 566px) 100vw, 566px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20566%20253'%3E%3C\/svg%3E\" alt=\"Followed by References to refer to the Selenium library\" width=\"566\" height=\"253\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library.jpg 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library-300x134.jpg 300w\" data-sizes=\"(max-width: 566px) 100vw, 566px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21313\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library.jpg.webp 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library-300x134.jpg.webp 300w\" sizes=\"(max-width: 566px) 100vw, 566px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library.jpg\" alt=\"Followed by References to refer to the Selenium library\" width=\"566\" height=\"253\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library.jpg 566w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Followed-by-References-to-refer-to-the-Selenium-library-300x134.jpg 300w\" sizes=\"(max-width: 566px) 100vw, 566px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 3:<\/strong> When the <strong>References<\/strong> dialog box opens, select the <strong>Selenium Type Library<\/strong> and click <strong>OK<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21327 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library.jpg.webp 458w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library-300x246.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20458%20375'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 458px) 100vw, 458px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20458%20375'%3E%3C\/svg%3E\" alt=\"Selenium Type Library\" width=\"458\" height=\"375\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library.jpg 458w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library-300x246.jpg 300w\" data-sizes=\"(max-width: 458px) 100vw, 458px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21327\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library.jpg.webp 458w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library-300x246.jpg.webp 300w\" sizes=\"(max-width: 458px) 100vw, 458px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library.jpg\" alt=\"Selenium Type Library\" width=\"458\" height=\"375\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library.jpg 458w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-the-Selenium-Type-Library-300x246.jpg 300w\" sizes=\"(max-width: 458px) 100vw, 458px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 4:<\/strong> Before writing the VBA code, you should inspect the elements of the website you aim to scrape and observe how they structure the data as we did earlier with the IEMode of Microsoft Edge.<\/p>\n<p><strong>Step 5:<\/strong> After thoroughly inspecting the website, you can now head on over to the Excel VBA environment to write the code. To do that, click on <strong>Insert<\/strong>\u00a0and then <strong>Module<\/strong>, as we did earlier.<\/p>\n<p><strong>Step 6:<\/strong> When the Module opens, write the following code in the editor.<\/p>\n<h3 id=\"code\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Code-10\"><\/span><strong>Code:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre>Sub VBA_Web_Scraping()\n\n\n\nDim tdl As New WebDriver\n\n\n\n<em>'Declaring variables for worksheet column and roll.<\/em>\n\n\n\nDim rowCounter As Integer\n\n\n\nDim colCounter As Integer\n\n\n\nrowCounter = 1\n\n\n\ncolCounter = 1\n\n\n\nApplication.ScreenUpdating = False\n\n\n\ntdl.Start \"chrome\"\n\n\n\ntdl.Get \" https:\/\/www.iban.com\/country-codes \"\n\n\n\nFor Each th In tdl.FindElementById(\"myTable\").FindElementByTag(\"thead\").FindElementsByTag(\"tr\")\n\n\n\ncolCounter = 1\n\n\n\nFor Each t In th.FindElementsByTag(\"th\")\n\n\n\nSheet2.Cells(1, colCounter).Value = t.Text\n\n\n\ncolCounter = colCounter + 1\n\n\n\nNext t\n\n\n\nNext th\n\n\n\nFor Each tr In tdl.FindElementById(\"myTable\").FindElementByTag(\"tbody\").FindElementsByTag(\"tr\")\n\n\n\ncolCounter = 1\n\n\n\nFor Each td In tr.FindElementsByTag(\"td\")\n\n\n\nSheet2.Cells(rowCounter, colCounter).Value = td.Text\n\n\n\ncolCounter = colCounter + 1\n\n\n\nNext td\n\n\n\nrowCounter = rowCounter + 1\n\n\n\nNext tr\n\n\n\nApplication.Wait Now + TimeValue(\"00:00:20\")\n\n\n\nEnd Sub<\/pre>\n<p>The code above shows that we created a <strong>subroutine<\/strong> named <strong>VBA_Web_Scraping<\/strong>. After that, we declared the variables for our worksheet column and row.<\/p>\n<p>To open Google Chrome and the webpage we want, we have used <strong>tdl.Start<\/strong> and <strong>tdl.Get. We have<\/strong> also\u00a0provided the URL of the web page here. The remaining part of the code tells VBA to fetch the table elements and add them to our declared worksheet. To get the data from the table, we have used the <strong>FindElementById<\/strong> and <strong>FindElementByTag<\/strong> methods.<\/p>\n<p>After inputting the code, assign the subroutine to an Excel <strong>button.<\/strong><\/p>\n<hr\/>\n<h2 id=\"creating-a-button-and-assigning-a-macro\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Creating_a_button_and_Assigning_a_Macro\"><\/span><strong>Creating a button and Assigning a Macro.<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Next, we would have to insert a button and assign a Macro to it. This is a very important stage of the website data extraction process by Excel VBA, so make sure you enter your code correctly earlier before saving.<\/p>\n<p><strong>Step 1:<\/strong> Begin by clicking the <strong>developer<\/strong> tab. Under that, click <strong>Insert.<\/strong> A drop-down menu would appear; under the <strong>Form Controls<\/strong>, click the first icon that represents a button.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21308 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab.jpg.webp 698w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab-300x142.jpg.webp 300w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20698%20331'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 698px) 100vw, 698px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20698%20331'%3E%3C\/svg%3E\" alt=\"Clicking the developer tab\" width=\"698\" height=\"331\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab.jpg 698w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab-300x142.jpg 300w\" data-sizes=\"(max-width: 698px) 100vw, 698px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21308\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab.jpg.webp 698w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab-300x142.jpg.webp 300w\" sizes=\"(max-width: 698px) 100vw, 698px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab.jpg\" alt=\"Clicking the developer tab\" width=\"698\" height=\"331\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab.jpg 698w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Clicking-the-developer-tab-300x142.jpg 300w\" sizes=\"(max-width: 698px) 100vw, 698px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 2: Click <\/strong>and <strong>drag<\/strong> your mouse cursor to create the button.<\/p>\n<p><strong>Step 3:<\/strong> The Assign<strong> Macro<\/strong> dialog box will pop up, as shown in the image below. If you have saved that Module correctly, you will see <strong>VBA_Web_scraping <\/strong>on the list of Macro names. Go ahead and select it\u00a0as the\u00a0<strong>Macro name<\/strong>. Click <strong>OK<\/strong> to assign the Macro.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21325 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name.jpg.webp 394w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-300x300.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-150x150.jpg.webp 150w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-65x65.jpg.webp 65w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-120x120.jpg.webp 120w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20394%20393'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 394px) 100vw, 394px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20394%20393'%3E%3C\/svg%3E\" alt=\"Select it as the Macro name\" width=\"394\" height=\"393\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name.jpg 394w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-300x300.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-150x150.jpg 150w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-65x65.jpg 65w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-120x120.jpg 120w\" data-sizes=\"(max-width: 394px) 100vw, 394px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21325\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name.jpg.webp 394w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-300x300.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-150x150.jpg.webp 150w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-65x65.jpg.webp 65w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-120x120.jpg.webp 120w\" sizes=\"(max-width: 394px) 100vw, 394px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name.jpg\" alt=\"Select it as the Macro name\" width=\"394\" height=\"393\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name.jpg 394w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-300x300.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-150x150.jpg 150w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-65x65.jpg 65w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Select-it-as-the-Macro-name-120x120.jpg 120w\" sizes=\"(max-width: 394px) 100vw, 394px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 4:<\/strong> To name the button, <strong>right-click<\/strong> on it and select <strong>Edit Text<\/strong>. You can edit it to the desired button name. We would name ours <strong>Table Data<\/strong>.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21322 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text.jpg.webp 271w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text-243x300.jpg.webp 243w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20271%20335'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 271px) 100vw, 271px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20271%20335'%3E%3C\/svg%3E\" alt=\"Right-click on it and select Edit Text\" width=\"271\" height=\"335\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text.jpg 271w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text-243x300.jpg 243w\" data-sizes=\"(max-width: 271px) 100vw, 271px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21322\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text.jpg.webp 271w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text-243x300.jpg.webp 243w\" sizes=\"(max-width: 271px) 100vw, 271px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text.jpg\" alt=\"Right-click on it and select Edit Text\" width=\"271\" height=\"335\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text.jpg 271w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Right-click-on-it-and-select-Edit-Text-243x300.jpg 243w\" sizes=\"(max-width: 271px) 100vw, 271px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p><strong>Step 5:<\/strong> If you did that correctly, your button should look like this:<\/p>\n<p><picture class=\"aligncenter size-full wp-image-21334 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Your-button-should-look.jpg.webp\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20170%20120'%3E%3C\/svg%3E\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20170%20120'%3E%3C\/svg%3E\" alt=\"Your button should look\" width=\"170\" height=\"120\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Your-button-should-look.jpg\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-21334\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Your-button-should-look.jpg.webp\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Your-button-should-look.jpg\" alt=\"Your button should look\" width=\"170\" height=\"120\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>It\u2019s time to run the code we inputted earlier.<\/p>\n<h3 id=\"output\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Output-2\"><\/span><strong>Output.<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Click on the button we just created to begin. After that, go ahead and check the worksheet. You would see that the scraped data from the web page table is the same as what we had earlier.<\/p>\n<hr\/>\n<h2 id=\"faqs-about-extracting-website-data-by-using-excel-vba\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"FAQs_About_Extracting_Website_Data_by_Using_Excel_VBA\"><\/span><strong>FAQs About Extracting Website Data by Using Excel VBA<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 id=\"q-is-web-scraping-with-vba-legal\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Q_Is_web_scraping_with_VBA_legal\"><\/span><strong>Q. Is web scraping with VBA legal?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Web scraping is generally not illegal, although some websites do not permit it. As such, VBA web scraping is not illegal either. Since it\u2019s a data extraction technique that legally uses Microsoft products, you are surely safe. However, it&#8217;s important to pay attention to the gray areas of web scraping via Excel VBA that may lead to a violation of a website\u2019s policy.<\/p>\n<h3 id=\"q-can-i-use-excel-vba-to-create-a-single-piece-of-code-that-scrapes-every-website\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Q_Can_I_use_Excel_VBA_to_Create_a_Single_Piece_of_Code_that_Scrapes_Every_Website\"><\/span><strong>Q. Can I use Excel VBA to Create a Single Piece of Code that Scrapes Every Website?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The short, uncomplicated answer is no. Although the methods are similar, the code for scraping various pages varies slightly, especially when connecting VBA to an external browser. The fact that each website has a unique web structure and style is one of the causes of this. The approach used by the code for scraping an e-commerce website differs from that used for crawling a social platform like Facebook.<\/p>\n<h3 id=\"q-do-i-need-programming-experience-in-order-to-use-excel-vba-to-extract-website-data\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Q_Do_I_need_Programming_Experience_in_Order_to_Use_Excel_VBA_to_Extract_Website_Data\"><\/span><strong>Q. Do I need Programming Experience in Order to Use Excel VBA to Extract Website Data?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To effectively extract data using Excel VBA, it is important to have a little knowledge of coding. This would let you know what to do even if you had to follow a tutorial. This is one of the downsides of web scraping with VBA. However the learning curve may be steep, but if you are determined, you can learn VBA programming in no time.<\/p>\n<hr\/>\n<pre style=\"text-align: center;\"><strong>Conclusion <\/strong><\/pre>\n<p>Web scraping relevant data from websites is, no doubt, as important as oil in our digitally advanced society. With different techniques out there for generating this data, Excel VBA web scraping remains one of the oldest and most efficient ways to gather data.<\/p>\n<p>Although it requires some basic understanding of codes, it can be done even as a beginner if you put your mind to it. We hope that this tutorial has given you some direction on web scraping with Excel VBA.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you looking for a cost-efficient way to scrape relevant website data? Excel VBA is a good pick for this. With little or no coding experience, this guide would help you learn how to launch Microsoft VBA and scrape website data into an Excel spreadsheet. In this digital era, websites play major roles in our &#8230; <a title=\"Extract Website Data from HTML to Excel using VBA [Step-by-Step Guide: HTML to Excel]\" class=\"read-more\" href=\"http:\/\/royadata.io\/blog\/extract-website-data-by-using-excel-vba\/\" aria-label=\"More on Extract Website Data from HTML to Excel using VBA [Step-by-Step Guide: HTML to Excel]\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":164,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts\/5977"}],"collection":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/comments?post=5977"}],"version-history":[{"count":0,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts\/5977\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/media\/164"}],"wp:attachment":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/media?parent=5977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/categories?post=5977"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/tags?post=5977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}