Free Excel VBA Course

Want to learn Excel VBA? You’re at the right place.

On this page, I have made available my entire Excel VBA course for FREE (no signup, no payment, absolutely free).

Here, you can access 36 videos (10+ hours or Excel VBA training) along with the example files. The course is created for anyone who wants to learn Excel VBA. It starts from the basics and equips you with all the important concepts before covering advanced concepts.

To make the most of this free VBA training, go through these videos in the order in which they have been listed.

NOTE: In case the video looks a bit blurry, you can change the video quality to 1080p (by clicking on the settings gear icon on the bottom right of the video screen)

⬇️ Click here to download all example Excel files

In case you find the videos useful and would like to support me, you can buy me a coffee ☕

01 – Getting Started with Excel VBA [An Introduction]

In this first video of this VBA course, I introduce you to Visual Basic for Applications (VBA) in Excel.

It covers what VBA is and why it’s useful for automating tasks in Excel and other Microsoft Office applications. It also covers the different things you can do with VBA, including automating repetitive tasks, creating custom functions, and building applications.

I also explain the concept of object-oriented programming using a simple analogy of delivering a package to Sherlock Holmes, and how this relates to Excel’s hierarchy of objects.

⬇️ Click here to download all example Excel files

02 – Introduction to the VB Editor (Visual Basic Editor)

In this video, I walk you through the VB Editor in Excel, which is where you’ll write and edit your VBA code.

It shows you how to access the VB Editor using different methods and explain its structure and key components. It also covers how to navigate the Project Explorer window, which displays all your workbooks and worksheets as objects.

It also covers the Properties window, where you can view and modify object properties, and explain how to insert modules for writing code. Finally, the video introduces the Object Browser, a helpful tool for exploring available objects and methods.

⬇️ Click here to download all example Excel files

03 – Recording a Simple VBA Macro (and Decoding it)

In this video, I show you how to record a macro in Excel VBA, a powerful way to automate tasks.

The video shows how to record a simple macro that colors cells, then walk you through understanding and modifying the generated code to make it more efficient.

You’ll see the difference between relative and absolute references in macros, and learn how to use keyboard shortcuts to run your macros quickly. Even if you’re new to VBA, recording macros is a great way to start learning coding while solving real Excel problems.

⬇️ Click here to download all example Excel files

04 – Run Macros in Excel (using buttons, shapes, shortcuts, and toolbar)

In this video, I show you different ways to execute macros in Excel. I start by recording a simple macro that enters text in cells, then demonstrate multiple methods to run it.

I cover how to create buttons specifically designed for macros and how to use shapes with assigned macros for a more customizable approach.

I also explain how to use the Macros dialog box, keyboard shortcuts, and the VB Editor’s toolbar to execute your code. Finally, I discuss macro security settings and how to handle them when sharing workbooks with macros.

⬇️ Click here to download all example Excel files

05 – Writing your first VBA Macro Code

In this video, I guide you through writing your first VBA code from scratch. I show you how to create a macro that adds a new worksheet and populates it with formatted text.

I explain how to use comments to make your code more readable and demonstrate how to access Excel objects like worksheets and ranges. I also cover how to apply formatting such as italics and background colors using VBA.

I introduce debugging techniques like stepping through code line by line, and explain how to save workbooks with macros using the appropriate file format.

⬇️ Click here to download all example Excel files

06 – Understanding Errors in VBA

In this video, I explain the different types of errors you’ll encounter when working with VBA. I demonstrate common syntax errors that occur when your code doesn’t follow VBA’s language rules, and show how the editor highlights these problems.

I cover compile errors that prevent your code from running at all, and runtime errors that occur while your code is executing.

I also introduce the Option Explicit statement to help prevent variable-related errors, and show how to use the debugging tools to identify and fix problems in your code.

⬇️ Click here to download all example Excel files

07 – Customize the VB Editor Environment

In this video, I show you how to customize the VBA editor environment in Excel to make your coding experience more efficient.

I walk through all the important options in the VBA editor, including syntax checking, variable declaration requirements, and code visualization features.

I demonstrate how these settings affect your coding experience and which ones are most helpful for beginners versus experienced VBA programmers. By the end of this video, you’ll know how to set up your VBA editor to match your preferences and coding style.

⬇️ Click here to download all example Excel files

08 – Working with Cells and Ranges using VBA in Excel (Select, Copy, Format)

In this video, I teach you how to work with cells and ranges in Excel VBA, which is an essential skill for any VBA programmer.

I demonstrate how to select and reference cells, how to add values to specific cells, and how to work with different data types. I explain the powerful technique of directly referencing cells without selection, and show you how to find the last used cell in a column.

You’ll also learn how to format cells, manipulate ranges, and copy data between worksheets. These fundamental skills will form the foundation of your VBA programming toolkit.

⬇️ Click here to download all example Excel files

09 – Working with Worksheets using VBA in Excel (Select, Add, Delete, Copy)

In this video, I cover how to work with worksheets and chart sheets using VBA in Excel. I show you how to select, add, delete, copy, and move worksheets programmatically.

I explain the difference between using worksheet names and code names, and why code names provide more reliable references. I demonstrate how to properly reference sheets, place new sheets in specific positions, and handle worksheet visibility.

These techniques are essential for building robust Excel applications that manage multiple worksheets effectively.

⬇️ Click here to download all example Excel files

10 – Working with Workbooks using VBA in Excel (Open, Close, Save)

In this video, I explain how to work with workbooks using VBA in Excel. I demonstrate how to open, close, and save workbooks programmatically.

I show you how to activate different workbooks, handle saving changes without prompts, and reference the workbook where your code is running using the ThisWorkbook property.

I also cover how to open workbooks from specific file paths and save workbooks with new names. These techniques are crucial for building VBA applications that need to manage multiple Excel files or automate workbook operations.

⬇️ Click here to download all example Excel files

11 – Using Data Variables in Excel VBA

In this video, I teach you how to use variables in Excel VBA. I start with a simple example of adding a movie to a list, demonstrating why variables are more efficient than hardcoding values.

I then explore different data types available in VBA including byte, boolean, integer, date, and string. I show you how to declare variables with the Dim statement, initialize them with values, and use them in your code.

I also explain variable scope and how to use Option Explicit to avoid errors from misspelled variable names.

⬇️ Click here to download all example Excel files

12 – Using Object Variables in Excel VBA

In this tutorial, I explain object variables in VBA Excel programming.

I demonstrate how object variables differ from data variables and show you practical examples using range objects (single cells and cell ranges), worksheet objects, and how to manipulate them.

You’ll learn the three key steps for working with object variables: declaration, initialization using the “Set” keyword, and performing operations.

By the end of this video, you’ll understand how to use object variables to create more efficient VBA code and manipulate Excel objects like cells, ranges, and worksheets.

⬇️ Click here to download all example Excel files

13 – Using Message Box in Excel VBA

In this video, I explain how to use message boxes in Excel VBA. I demonstrate different ways to customize message boxes, including changing the title, text, buttons, and adding icons.

I show you how to display values from cells and variables in message boxes, and how to combine text using concatenation.

Most importantly, I teach you how to capture and use the result of message box button clicks to create interactive applications that respond differently based on user selections.

⬇️ Click here to download all example Excel files

14 – With Statements in VBA in Excel

In this video, I teach you how to use With statements in Excel VBA. I show you how With statements can simplify your code when you’re applying multiple changes to the same range or object.

I demonstrate formatting cells with interior color and font properties, both with and without the With statement.

I also cover how to nest With statements for more complex formatting tasks and how to apply With statements to dynamic ranges of cells using the End(xlDown) method.

⬇️ Click here to download all example Excel files

15 – IF Then Else Statement in Excel VBA

In this video, I teach you how to use IF statements in Excel VBA. I start with a simple example of checking student marks to determine if they’ve passed or failed.

I then demonstrate more complex scenarios including nested IF conditions for assigning letter grades based on mark ranges. I show you different ways to format IF statements, including single-line syntax and line continuation.

Finally, I explain how to use AND and OR operators to test multiple conditions within a single IF statement.

⬇️ Click here to download all example Excel files

16 – SELECT CASE Statement in Excel VBA

In this video, I teach you how to use Select Case statements in Excel VBA as an alternative to multiple IF conditions.

I use a student grading example to demonstrate how Select Case works, first with a simple pass/fail scenario and then with a more complex letter grading system.

I show you how to use the “Case Is” syntax for comparison operators and how to specify ranges of values using the “To” keyword. I explain when Select Case is preferable to nested IF statements for readability and maintenance.

⬇️ Click here to download all example Excel files

17 – Do While and Do Until Loop in Excel VBA

In this video, I teach you how to use Do While and Do Until loops in Excel VBA. I demonstrate how these loops work with practical examples, showing you how to select cells until you encounter a blank cell.

I explain the difference between placing conditions at the beginning or end of loops, and how it affects execution.

I also cover how to use the Exit Do statement to break out of loops based on specific conditions. By the end, you’ll understand the subtle differences between Do While and Do Until loops and when to use each.

⬇️ Click here to download all example Excel files

18 – FOR NEXT Loop in Excel VBA

In this video, I explain how to use For Next loops in Excel VBA. I start with the basic syntax and show you how to create a counter variable that iterates through a specified range.

I demonstrate how to control the increment value using the Step keyword, allowing you to count by twos or even count backward.

I also cover how to exit a For loop early using the Exit For statement when specific conditions are met. Finally, I show practical examples of using For Next loops with ranges and worksheets collections in Excel.

⬇️ Click here to download all example Excel files

19 – FOR EACH Loop in Excel VBA

In this video, I teach you how to use For Each loops in Excel VBA. I explain that For Each loops are specifically designed for working with collections of objects, such as cells, worksheets, or workbooks.

I demonstrate the syntax and show you how to declare the appropriate object variables for your loops. Using practical examples, I walk through how to loop through a range of cells and print their values, as well as how to loop through worksheets to manipulate multiple sheets at once.

This loop structure is particularly helpful when working with collections of Excel objects.

⬇️ Click here to download all example Excel files

20 – Creating Custom Functions in Excel Using VBA

In this video, I show you how to create custom functions in Excel using VBA. I explain the difference between subs and functions, and demonstrate how to create simple functions that return values like the current date or the month from a date.

I show how to call functions from other subs, and then create a practical custom function that performs multiple lookups and returns all matching results in a single cell.

I also explain how to make function arguments optional by providing default values. These custom functions can help you extend Excel’s capabilities beyond built-in formulas.

⬇️ Click here to download all example Excel files

21 – Using Worksheets Functions in VBA

In this video, I show you how to use Excel worksheet functions within your VBA code.

I demonstrate how to access functions like VLOOKUP, INDEX/MATCH, SUMIF, and others directly in your VBA procedures using the WorksheetFunction object.

I walk through practical examples of using SUM and SUMIF in VBA code, showing how they return values as Double data types.

I also briefly explain the difference between worksheet functions and built-in VBA functions while providing tips on where to find comprehensive function documentation.

⬇️ Click here to download all example Excel files

22 – Error Handling in VBA (On Error Goto/Resume)

In this video, I teach you how to handle errors in VBA using various error-trapping techniques.

I start with a simple example of catching a type mismatch error in an input box and show you how to use “On Error GoTo” statements to direct code execution when errors occur.

I demonstrate how to create error-handling loops, how to resume code execution after errors, and how to neutralize error trapping. I also cover the Error object which lets you access error descriptions and numbers to create more user-friendly error messages.

⬇️ Click here to download all example Excel files

23 – Event Procedures in VBA

In this video, I explain how to use event procedures in Excel VBA to run code when specific events occur.

I demonstrate both workbook events (like Open, BeforeClose, and BeforePrint) and worksheet events (like Activate, BeforeDelete, and SelectionChange).

I show practical examples including displaying welcome messages when opening workbooks, creating timesheet reminders before closing, preventing worksheet deletion without confirmation, highlighting cells on selection, and building an interactive to-do list with strikethrough formatting using the BeforeDoubleClick event.

⬇️ Click here to download all example Excel files

24 – Userform Basics in Excel VBA

In this video, I introduce the basics of UserForms in Excel VBA. I show you how to create a simple form with labels, text boxes, and command buttons.

I explain how to change properties like names and captions, and demonstrate the Hungarian notation naming convention for form controls.

I walk through creating a simple form that captures a name and inserts it into a cell, adding command buttons with functionality, and show you different ways to launch your UserForm from your worksheet using both ActiveX controls and shapes.

⬇️ Click here to download all example Excel files

25 – User Form Deep Dive in Excel VBA (Advanced)

In this advanced UserForm tutorial, I show you how to build a complete employee details form with validation. I create a form with text inputs, option buttons for gender selection, a dropdown list for departments, and date input with validation checks.

I implement form validation that highlights incomplete fields in red, prevents submission of invalid data, and returns focus to problematic fields.

I also demonstrate how to connect your form to a worksheet table and how to implement dynamic validation as users type, creating a professional data entry solution.

⬇️ Click here to download all example Excel files

26 – Using Arrays in VBA

In this tutorial, I show you how to use arrays in VBA for Excel. I start with simple one-dimensional arrays, demonstrating both fixed-length and dynamic arrays.

Then I cover multi-dimensional arrays and show practical examples of storing and retrieving data. I explain key concepts like array bounds, looping through arrays, and redimensioning arrays on the fly.

This tutorial includes step-by-step examples using company data to illustrate how arrays can efficiently handle data in Excel VBA.

⬇️ Click here to download all example Excel files

27 – Working with Charts in Excel Using VBA

In this tutorial, I demonstrate how to work with charts in Excel VBA. I start with the basics of creating charts using VBA code, exploring both chart sheets and embedded charts.

I show you how to modify chart properties like titles and types, and how to loop through multiple charts to make bulk changes. I also cover how to use the macro recorder to generate chart code that you can study and modify.

Throughout the video, I provide practical examples using sales data to help you understand all the key concepts for automating chart creation and formatting in Excel.

⬇️ Click here to download all example Excel files

28 – Show Hide Elements in Excel using VBA

In this tutorial, I demonstrate how to show and hide objects using VBA in Excel. I walk through a practical example using an English Premier League dashboard I created, which features a help menu toggle button.

When clicked, this button displays text boxes with instructions, and clicking again hides them.

I show you the simple VBA code behind this functionality and explain how you can implement this technique in your own Excel dashboards and forms to guide users through different steps.

⬇️ Click here to download all example Excel files

29 – Run a Macro when a cell is selected

In this video, I show you how to run a macro when clicking on a cell in Excel using VBA. I demonstrate a practical example where clicking on different metrics (revenue, gross profit, net profit, employees) automatically updates a chart.

You’ll learn how to implement the selection change event in VBA and how to use a Select Case statement to handle different cell values.

I also explain the simple conditional formatting technique that highlights the selected metric. This powerful technique can be used to update not just charts, but entire dashboards with a single click.

⬇️ Click here to download all example Excel files

30 – Mouse Roll Over Effect using VBA

In this video, I show you how to create an interactive rollover mouse effect in Excel dashboards. I demonstrate how hovering your mouse over specific icons can dynamically update charts without clicking.

I walk through creating this functionality step-by-step using a combination of VBA custom functions, named cells, and conditional formatting.

This powerful technique allows users to quickly toggle between different data sets in your Excel dashboards, making them more interactive and user-friendly.

⬇️ Click here to download all example Excel files

31 – Creating Chart Animations using VBA

In this tutorial, I show you how to create animated charts in Excel using VBA. I demonstrate how to make line and column charts where data points appear one by one, creating a dynamic visualization effect.

You’ll see my dummy website traffic data example and learn the exact VBA code needed to implement this animation technique.

I’ll explain how to control animation speed, clear previous values, and ensure smooth updating with the DoEvents function. This cool technique is perfect for highlighting trends or variations in your data presentations.

⬇️ Click here to download all example Excel files

32 – Creating Excel Add-ins

In this tutorial, I show you how to create and use add-ins in Excel VBA. I demonstrate a practical example using a custom function called “SingleCellExtract” that retrieves multiple matching values into a single cell.

I walk you through the entire process – from creating the function to saving it as an add-in, making it available across all your workbooks, and even protecting it with a password.

This efficient approach eliminates the need to copy-paste code across multiple workbooks and makes your custom functions easily accessible.

⬇️ Click here to download all example Excel files

33 – Creating a Simple Application Using VBA

In this video, I show you how to create a Task Matrix application in Excel using VBA. This powerful productivity tool helps you organize tasks based on importance and urgency using the Eisenhower Matrix concept.

I walk through the application’s functionality, demonstrating how to add new tasks, mark them as complete, and remove completed items.

While I don’t recreate the entire application from scratch, I explain the thought process behind building it and show how user forms, event handling, and VBA modules work together to create this practical Excel tool that has been downloaded thousands of times from my website.

⬇️ Click here to download all example Excel files

34 – Working with Files and Folders using Excel VBA (Copy files and Folder)

In this tutorial, I show you how to work with files and folders in Excel VBA. I’ll walk you through connecting to the Microsoft Scripting Runtime library first, which gives you powerful file management capabilities.

You’ll learn how to create folders, check if they already exist, copy individual files between folders, and even handle multiple files and subfolders at once.

I demonstrate practical examples using desktop folders and Excel files, with clear explanations of the VBA code at each step. This is perfect for Excel users who need to automate file operations in their workflows.

⬇️ Click here to download all example Excel files

35 – Creating Word Reports Using VBA

In this tutorial, I show you how to use VBA to connect Excel and Word. I demonstrate how to open a Word document from Excel, copy and paste an Excel table into Word, and save and close the Word file—all using VBA code.

I explain the difference between early binding and late binding when connecting to the Word application, and show you how to properly reference Word libraries.

I also cover how to format text in Word using VBA and how to create dynamic file names to avoid overwriting previous reports. This is a practical guide for anyone looking to automate report generation from Excel to Word.

⬇️ Click here to download all example Excel files

36 – Save Excel File as PDF using VBA (Entire Workbook or Individual Sheet)

In this tutorial, I show you how to convert Excel workbooks, worksheets, and even specific ranges into PDF documents using VBA.

I walk through the process step-by-step, demonstrating how to create PDFs of entire workbooks, individual sheets, chart sheets, and custom ranges.

You’ll learn how to specify file names and save locations for your PDFs, plus I share a helpful loop technique to export multiple worksheets at once. This is a practical VBA skill that can save you time when creating professional reports from your Excel data.

⬇️ Click here to download all example Excel files

ABOUT THE INSTRUCTOR

I am Sumit Bansal, your instructor for this Excel Training. I have been training people in basic/advanced Excel and dashboards for more than 12 years now.

I have also been recognized by Microsoft as an Excel MVP 12 years a row.

In this free Excel VBA course, I’ve focussed on giving you a structured and comprehensive learning experience.

When you’re done with the course, I’m sure you’ll be able to do some amazing things with VBA and automate many of your repetitive tasks.

FAQs about this FREE Power Query Training

Is this course really free?

Yes, absolutely! Just click on the video and start watching.

I’ve also given all the example files I’ve used while recording the videos so that you can follow along.

You can watch each lesson and as many times as you want. All you need is a decent internet connection.

Note: To cover the costs of providing this training for free I am going to show some ads on this page. But as promised, you get the entire VBA course for free.

Can I download the videos?

No, you can only watch the videos online. These videos can not be downloaded.

Which version of Excel is used to create this course?

I have used the Excel 2013 to record these videos.

But here is the great thing. There has been no update to VBA in the past 10 years. So whatever you learn in this video course is going to work for any Excel version you have, including Excel 365.

If you have any questions or feedback, do let me know in the comment section.

Other useful Excel Resources:

Picture of Sumit Bansal
Hello there! I'm Sumit Bansal, founder of trumpexcel.com and an Excel MVP. I started this website in 2013 with a simple goal: to share my love for Excel through easy to follow tips, tutorials and videos. I'm here to help you get the best out of MS Excel to save time and boost your productivity.
Free-Excel-Tips-EBook-Sumit-Bansal-1.png

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Free-Excel-Tips-EBook-Sumit-Bansal-1.png

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Free Excel Tips EBook Sumit Bansal

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster