
Explore how VBA connects Excel to the web by navigating the course structure, from general web concepts to exchange fundamentals, HTTP and HTML, and web data retrieval.
Explore how the web works from browser to server, including backend and frontend roles, HTTP requests and responses, status codes, and the role of APIs and web services.
Learn to use IE and Chrome developer tools to inspect web pages, view network responses, and locate the customers table for VBA routines.
tools to use:
Notepad++
geany
HTML formatter
HTML Beautifier
CSS beautifier
See the resource file (Excel vba-web-tool-list.xlsx for more information and the links to download the tools)
Explore how to use Excel to gather information from the web, start with a blank workbook, and navigate recent files and templates.
Explore the Excel window and ribbons, including the home, insert, and formulas tabs, then enter data in cells, and insert tables or charts, while adjusting layout and view.
Explore the workbook as the core Excel file in VBA, save it with the proper extension in a chosen directory, and open or create workbooks for practice.
Explore the worksheet object in VBA, see how a workbook contains worksheets, switch between them, reference cells, move or copy sheets, and protect with a password while hiding or unhiding.
Master workbook, worksheet, and ranges; input data, copy and paste with values or formulas, paste special, and adjust formulas; insert, delete, and shift cells, rows, and columns.
Learn to manipulate rows and columns in Excel using VBA, including selecting, inserting, deleting, and saving changes to ranges.
Learn to use the data tab to apply data validation in Excel, including list constraints from a range, numeric limits, input messages, and error prompts for invalid entries.
Explore conditional formatting in Excel by creating and managing rules, applying data bars and colors, and using formulas to format cells based on values such as greater than or between.
Learn how to select ranges in Excel, name them and manage tables using Name Manager, and understand how range lists and named ranges appear and refresh.
Master macros in Excel using VBA, including recording a macro, using the developer ribbon, and running the macro with a worksheet button.
Explore sub and function definitions, string handling, and returning values in vba. Learn about console modules, public and private scope, and workbook and worksheet objects with their properties and methods.
Explore how to use the VBA message box to communicate with users, including mandatory and optional parameters, button options like OK, yes/no/cancel, and handling user choices.
Define constants in VBA with public or private scope, assign fixed values such as integers, and reuse them across a project to ensure values stay unchanged.
Explore VBA operators, including arithmetic and comparison operators, with examples on numbers and strings. Learn how greater than, less than, equal, not equal, and string operations shape logic and results.
Master VBA looping constructs by exploring while and do until loops, including exit and break mechanisms, to control Excel automation and stop conditions in rows and columns.
Learn how to manage date and time data in VBA for Excel, including creating functions and subs, formatting dates, and computing differences, with practical examples of getting and setting dates.
Explore how VBA handles events and objects, using worksheet and workbook events such as open, before close, change, and selection change to automate actions and respond to user interactions.
Learn to identify syntax, runtime, and logic errors in VBA, and apply error handling with message boxes, error descriptions, division by zero handling, and resume next to control flow.
Explore VBA classes and how to declare class modules to create objects with properties and methods. Learn initialization and get/set properties, using a balance example.
Explore HTML basics as the markup language for web pages, learning how document structure uses tags like doctype, title, and body to organize headings and paragraphs.
Explore basic html tags, including headings from h1 to h6, paragraphs, line breaks, the center tag, preformatted text, and script blocks for web content formatting.
Explore common HTML attributes and how to assign them, notably the class attribute with values in double quotes. See how color and background color styles use attributes such as title.
Explore how html phrase tags emphasize text and mark quotes, abbreviations, and acronyms in web content.
Explore how HTML comments work in code to document intent without rendering in the browser, and learn how comments help developers remember what the code does.
Discover how to create text links in HTML using the anchor tag and href attribute, and control where they open with target, including same-page anchors and _blank.
Learn about HTML frames, the frame tag, and framesets, and understand how to display content in frames versus no frames.
Learn how HTML colors work with rgb values from 0 to 255, applying background and text colors to elements using red, green, blue, lime, and white.
Learn how to embed multimedia in HTML using the embed and object elements, with src, type, width, height, autoplay, and loop attributes, plus fallback notes for non-supporting browsers.
Explore the HTML header section, including title tags, meta tags, robots, base href, and links to CSS and JavaScript to structure and control a web page.
Learn javascript fundamentals for web pages, including how scripts run at runtime, respond to events, use functions like hello, and work with external scripts and browser support.
Explore HTML layouts using tables to define rows and columns, merge cells, set widths, heights, and background colors, then use div and span for block, inline, and floating styling.
Discover VBA web scraping tools for Excel, using dom techniques and regular expressions to extract table data. Learn to perform get and post requests, submit data, and verify link status.
Explore VBA web scraping with Internet Explorer and XMLHTTP objects to access and parse data. Master DOM navigation and get or post requests, including ServerXMLHTTP for robust web services.
Learn to use VBA objects for web scraping with early binding, reference setup, and document parsing to access tables and elements, and employ web browser form control to extract data.
Learn to open a web page from VBA by creating a browser object, choosing Internet Explorer or Chrome, and navigate to a URL while toggling visibility.
Open a web page from Excel using the hyperlink method of the workbook object in VBA. Launch a browser like Chrome by default and load the target URL.
Learn to parse web pages with the HTMLDocument object in VBA, using the Microsoft HTML Object Library to access the document body, tables, and elements, and extract text.
Create an HTML table from the active Excel worksheet using VBA, mapping columns to headers and building rows. Copy and paste the generated HTML for easy deployment.
Convert an Excel range into an html table and publish the resulting html file to the web using vba, including saving to text and using publish objects.
download a file from a website using VBA in Excel by specifying the link and destination, then call library functions and check success with messages.
Learn to scrape data from a website with VBA by creating an Internet Explorer object, extracting a table with get elements by class, and importing to Excel.
Extract data from an HTML table and display it in an Excel file with VBA, handling dynamic class changes, column extraction, arrays, and formatting while using developer tools and cookies.
Learn to extract data from an HTML table with VBA and populate an Excel worksheet by leveraging the HTML document model and table elements.
Learn to extract data from websites into an Excel macro using VBA with ServerXMLHTTP, and manage web access by handling HTTP status codes such as 200 and 403.
Read data from a website using a VBA web query to connect Excel to the web.
Submit forms from Excel with VBA by creating a table, setting starting range for results, posting text, and using parameters across worksheets to display results on the front page.
Learn how to use VBA and a browser to fetch web data, parse the document object, iterate elements, extract links and text, and display results.
Import JSON into Excel with VBA, parse web service data using a JSON parsing library, and populate worksheet 1 with id, name, username, email, address, city.
Import an XML file into Excel with a simple VBA routine that traverses the root, employees, and their nested child nodes to populate worksheet data.
Learn to instantiate and control Internet Explorer via VBA, set references, navigate pages, make the browser visible, and synchronize with page state before proceeding.
Learn to fetch a web page's content with VBA, then extract data from the page using the document and element collections, such as questions and votes.
Learn to scrape data from an HTML table with a VBA macro by looping the table body, rows, and columns, and printing the extracted results.
Develop a VBA web-scraping macro that navigates to a page, accesses the HTML table elements by class names, and loops through rows to extract column data.
Use a VBA macro to scrape a web page table, get elements by tag name, count rows and columns, then export the data to Excel.
Learn how to use a VBA web scraping macro to locate an HTML table by class name, select the first table, iterate its rows and cells, and print the data.
Learn how to work with HTML forms in a VBA workflow, capture first name and last name using indexing and collections on a Stockholm art school website.
Retrieve and manage events in HTML tables with VBA, locate elements, trigger click interactions, open menus, and parse form data and JavaScript-driven content.
Learn to automate submitting an html form from Excel using VBA by locating the form, populating inputs (job type, experience, city), triggering the submit, and parsing the resulting job listings.
Learn how to use VBA to open a web page from Excel, extract all links containing specific text, and click to download documents.
Learn to return the entire HTML document via VBA by automating Internet Explorer to load all elements of a web page and access the document.
Learn to interact with web pages and forms in Internet Explorer using VBA SendKeys, simulate keystrokes, type strings, move focus, and wait for the keystroke process to finish.
Keep the focus on the Internet Explorer window by using the set foreground window function, checking the open title, and looping to maintain control for form input.
Learn how to retrieve the value of a web page input using VBA by accessing the document object, using querySelector or get elements by name, and reading the input's value.
VBA was considered a dead language until new functionalities and objects have been made available to enable data exchange between MS Office products and the Web.
Today VBA offers functions to send HTTP requests, receive HTTP responses and parse the final results using technologies and objects e.g. DOM, XML parsing, JSON parsing, XML XPath, VBA Regular Expressions, ADODB connections to SQL Server and mySQL Databases, generate Web Browsers to embed into VBA forms and much more.
Before into details I have included some lectures for those that are new to understand and get to know Excel, Visual Basic for Applications (VBA) and HTML.
The students will learn the following in this course:
HTML DOM
HTML editing tools
Open a Web page in VBA
Create HTML Tables with from Excel Worksheets with VBA
Create HTML Files with a Table of Contents based on Cell Data
Download File from Website Using Excel
Scraping data from website using vba
Get data in an HTML table and display in an Excel file
Get all the data in an HTML table and display in an Excel file
VBA Code – To extract data – From website to Excel Macro with ServerXMLHTTP
Scraping a website HTML in VBA using the HTMLDocument object
Read data from a website using VBA web query
Import Website data to Excel
Embed a browser in an Excel VBA form
Identify information on a Web Page and display it in human readable way
Processing human friendly messages
Generate machine-friendly messages
Import JSON to Excel
Import an XML file into Excel
Get data from the web
Use the InternetExplorer Object to get Data from the Web
Use the InternetExplorer object to get elements of an HTML table
Retrieve single HTML elements using the InternetExplorer object
Parse and submit an HTML form using the InternetExplorer object
Trigger events of elements using the InternetExplorer object
Click on a button and trigger the associated event using the InternetExplorer object
Enter data dynamically into an HTML form using the InternetExplorer object
Use XMLHttp to send HTTP requests, receive HTTP responses and parse the content
Use ServerXMLHttp to send HTTP requests, receive HTTP responses and parse the content
Using ServerXMLHTTP to GET XML results from a Web page
Using ServerXMLHTTP to POST XML to a Web page
Providing authentication info via msxml2.ServerXMLHTTP (use JustGiving API)
Scrape html by element id, name after response using msxml2.ServerXMLHTTP
Save MSXML2.ServerXMLHTTP Response text is an HTML Page
Extracting data from the response of a serverXMLHTTP request
Extract a table of data from a website using a VBA query
Pull data into Microsoft Excel with Web queries
Import HTML content in Excel with Query Tables
Import HTML table with Web Query
Invoke a SOAP Web Service from custom VBA Code
Do a SOAP Request in VBA
Use VBA to send XML to WSDL
Create a SOAP Request/Response using XML from VBA
Get Http Request In Excel Vba
Build a VBA App from calling an API
Make REST call with VBA in Excel: WinHttp
Send HTTP requests with VBA from Excel with WinHttp
Get Http Request In Excel Vba with WinHttp
Get JSON Response with WinHTTP in VBA
Install and configure SQL Express Server and the Management tool for testing
Connect to a remote SQL Server DB With VBA & ADODB
Use Excel VBA to Query a SQL Server Database
Install and configure a mySQL Database for testing
Connect to remote MySQL Database
Connect to MySQL database in Excel with VBA and get the data
Send HTML Email from Excel using VBA
Show RSS Feeds in Excel
Read RSS feeds from VBA
create an rss feed with Excel VBA
Get Data from Bing Search and display the results using DOM
Display google maps on a UserForm
Calculate durations and distances of itineraries from Google Maps with VBA
Retrieve Address Geocoding with VBA and Google Maps
Parse strings from HTML code via VBA code using RegEx
...