Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Learning VBA in Excel

via LinkedIn Learning

Overview

Learn to automate routine tasks and customize the functionality of Excel features with this crash course in Visual Basic for Applications (VBA).

The Visual Basic for Applications (VBA) programming language allows you to automate routine tasks in Excel—and it's not as hard to learn as most people think. In this course, Excel expert Curt Frye offers a crash course on VBA, sharing techniques that can help users of Excel 2007 or later get more out of this powerful program. Curt covers creating subroutines and functions to hold code, and provides a solid grounding in the Excel object model. Programming techniques are demonstrated through real-world examples. Exercise files accompany the course.

Syllabus

Introduction
  • Dive into using VBA in Excel
  • What you should know
1. Visual Basic for Applications
  • Introduce object-oriented programming
  • Examine the Excel object model
  • Work in the Visual Basic Editor
  • Set VBA project properties
  • Create, export, and delete code modules
  • Create a subroutine
  • Create a function
  • Add comments to your code
  • Run a VBA routine
  • Add code to a recorded macro
2. Defining Variables, Constants, and Calculations
  • Introduce Excel VBA data types
  • Declare variables and require declaration before use
  • Manage variable scope
  • Define static variables and constants
  • Create a calculation using mathematical operators
  • Define arrays
  • Define and use object variables
  • Streamline code references using With…End With statements
3. Adding Logic to Your VBA Code
  • Repeat a task using a For...Next loop
  • Step through all items of a collection using a For...Each loop
  • Repeat a task using a Do loop
  • Perform a task when conditions are met using an If...Then statement
  • Select which action to take using a Case statement
4. Debugging Your VBA Code
  • Manage errors using On Error statements
  • Step through a subroutine or function
  • Set breakpoints in your code
  • Verify output using the Immediate window
  • Watch a value in a routine
5. Managing Workbook Elements and Data in VBA
  • Write a value to a cell
  • Cut, copy, and paste cell data
  • Find values in cells
  • Refer to cells using the OFFSET function
  • Concatenate text strings
  • Return part of a string
  • Manage worksheets with VBA
  • Manage workbooks with VBA
6. Adding Advanced Elements to Your Workbook
  • Turn off screen updating when you run a macro
  • Use worksheet functions in a macro
  • Acquire values using an input box or message box
  • Call a subroutine from another subroutine
7. Using Excel Events in Your VBA Code
  • Run a procedure when you open, close, or save a workbook
  • Run a procedure when a cell range changes
  • Trigger a procedure using a specific key sequence
8. Putting It All Together
  • Apply techniques in a capstone project
Conclusion
  • Further information

Taught by

Curt Frye

Reviews

Start your review of Learning VBA in Excel

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.