You are previewing this course

Each course is broken down into short video tutorials taught by award-winning instructors. To access the entire course:

Login Redeem a voucher View pricing

Microsoft Excel - Macros and VBA


A brief discussion about the differences between macros and VBA, and how this course covers both.

Entry level steps to allow the user to record macros in Excel.

Recording a simple Macro in Excel.

A discussion on which files types support macros, and why it is critical to save your work before moving forward.

How to run a macro from the Macro dialog.

How to run a macro from a keyboard shortcut.

How to run your macro from a worksheet button.

Meet the Visual Basic Editor (VBE) - your coding studio.

A discussion of the different items you'll encounter as you learn to code, and how they relate to each other.

A visual view of a portion of Excel's object model.

Examining the different code containers and where you should place your code.

Looking at the different keywords and structure that make up a valid macro.

Editing the previously recorded code in order to remove unnecessary objects.

How to step through a macro line by line in order to aid in debugging.

How to set and use breakpoints during code development and debugging.

A discussion of what variables are, and what they do for us when coding.

Setting up variable dimensions and ensuring the code does so in the correct location.

How to assign strings, values or objects to variables and use them in your code.

Why forgetting to set a simple flag can burn you in the long term.

Working with the locals window to help you debug and explore the object model.

Exploring the benefits of the Immediate window for logging and querying, as well as writing when needed.

How to use the Watch window to break code execution when variable conditions are met.

How the Stop keyword can be used during code development similar to a breakpoint.

How "With" blocks can tighten up your code and ensure your code targets the objects you expect.

Implementing If/Then choices in VBA.

Understanding how the Select Case construct adds another logic test to your coding arsenal.

Basic looping including counting iterations and exiting.

More advanced looping by looping while or until a certain condition is met.

Running a loop a set number of times.

Using a For Each loop to cycle through each object in a collection such as each worksheet in a workbook's worksheets.

Setting up a master macro allowing you to call other macros from a single source.

How to provide feedback to your user via the VBA MsgBox object.

Identifying which button the user clicked when presented with a MsgBox in order to use their response in our code.

Working with the VBA InputBox to prompt the user to enter information and capture it for later use.

Forcing users to enter data when requested.

How to trigger various errors in VBA, and what they mean.

How to set up an error trap in VBA to handle errors.

Setting up an error handling section for your macro.

The syntax signature for a UDF and how it differs from a standard subroutine.

Creating a UDF to return the user name.

Calling a UDF from a worksheet and from VBA.

Sorry, it looks like there are no lessons that match your filter.