Who it's for: Business Analysts, Data Scientists, and everyone in between looking to write their own rulebook on what’s possible in Excel.
What it is: Visual Basic for Applications (VBA) is the programming language for Excel and other Microsoft Office programs. VBA is used to automate repetitive processes and frequent actions. Even more, it can be used to build tools that otherwise don’t exist in Excel.
What you'll learn: In this 4-part series, we start with the basics, giving you an overview of what you can do with VBA and its advantages over recording macros in the Excel interface. We'll record a macro, which produces VBA code in the background, and learn the Visual Basic editor environment before editing the code generated by our macro. Throughout this section, you will learn some key terminology that will help you along the way. We will end the first lesson by learning how to save a macro-enabled workbook and modify trust center settings pertaining to macro security. We will then move on to understanding the Excel Object Model, collections, and how to reference objects in VBA code. Once those basics are covered, you will be ready to move on to learning about the different types of procedures, creating procedures, learning the scope of procedures, and working with methods. You will also learn how to get VBA context-specific help from within the editor. A key component of VBA is language elements. We will learn about this important topic by going over variables, their scope, and how to declare them. You will also gain an understanding of VBA data types, intrinsic functions, and the With-End With structure and how it provides efficiency in your code. You will also learn to create message boxes and input boxes in this lesson, as well as gain an understanding of object variables. The next lesson will teach you how to control program flow through supported control-of-flow structures. This lesson begins with an overview of structures and Boolean expressions. You will then learn how to utilize conditional branching, with the lesson ending with looping constructs. We move into creating a form and programming its controls. During this lesson, you will learn about form properties, events, and methods, and learn how to add controls to the form and modify control properties. You will ultimately launch a form with code. The next lesson will take you through the steps necessary to create a Pivot Table programmatically in VBA. The series ends with you learning how to deal with code errors (debugging) and how to write error-handling code. By the end of this training series, you will be equipped with the basics to start writing your own VBA code, modify macros you’ve recorded, and have an understanding of how VBA lends itself to creating efficiency in your daily tasks.
- Introduction (1:17)
- Introduction to Forms and Controls (1:25)
- Form Properties, Methods, and Events (2:35)
- Inserting and Modifying UserForm Objects (2:44)
- Using Label Control on Forms (3:18)
- Using Textbox Control on Forms (1:26)
- Using Command Button Control on Forms (2:50)
- Using Combo Box Control on Forms (1:47)
- Using Frame Control on Forms (1:28)
- Using Option Button Control on Forms (2:05)
- Changing Option Button Properties (2:00)
- Formatting Form Controls (4:01)
- Testing and Modifying Tab Order on Forms (3:17)
- Using Code to Populate Combo Boxes and Setting Defaults (4:59)
- Modifying Combo Box Code and Inserting Control Code Files (2:41)
- Reviewing Inserted Code (2:51)
- Testing Modified and Inserted Code (1:58)
- Writing Code to Display Forms (1:29)
- Forms and Controls Recap (1:24)
- Introduction to Pivot Tables in VBA (1:17)
- PivotCache, PivotTable, and PivotFields Objects (4:10)
- Recording Macros to Create PivotCache (1:31)
- Recording Macros to Set Pivot Table Fields (1:15)
- Reviewing Macro Codes (1:24)
- Creating Pivot Tables Programmatically (6:42)
- Creating Code to Set Pivot Table Fields (6:36)
- Finalizing Forms (4:06)
- Reviewing Inserted Code (2:20)
- Finalizing Code (4:00)
- Creating and Modifying Function Procedures (2:49)
- Testing Forms (4:43)
- Adding QAT Icon to Launch Form (2:34)
- Testing Final Forms (3:24)
- Pivot Tables in VBA Recap (2:44)
- Conclusion (0:09)