Microsoft Excel – Programming With VBA

Duration: 3 days

This VBA Programming for Excel training course is designed to give experienced Excel users proficiency in creating procedures that run in response to specific events, working with control structures, developing user forms to accept or display data, validating the data entry in user forms, and debugging and handling errors in code.

Interested in attending? Have a suggestion about running this course near you?
Register your interest now

Description

Course Objectives

  • Work with variables and understand data types
  • Understand objects, properties, methods, and events
  • Explore the Excel object hierarchy and use the Object Browser
  • Work with control-of-flow structures
  • Use intrinsic functions
  • Create sub and function procedures
  • Design UserForms and work with controls
  • Control PivotTables programmatically
  • Use debugging tools
  • Add error handling to code

Detailed Syllabus

Course Outline

    1. Getting Started
      1. Introducing Visual Basic for Applications
      2. Displaying the Developer Tab in the Ribbon
      3. Recording a Macro
      4. Saving a Macro-Enabled Workbook
      5. Running a Macro
      6. Editing a Macro in the Visual Basic Editor
      7. Understanding the Development Environment
      8. Using Visual Basic Help
      9. Closing the Visual Basic Editor
      10. Understanding Macro Security
    2. Working with Procedures and Functions
      1. Understanding Modules
      2. Creating a Standard Module
      3. Understanding Procedures
      4. Creating a Sub Procedure
      5. Calling Procedures
      6. Using the Immediate Window to Call Procedures
      7. Creating a Function Procedure
      8. Naming Procedures
      9. Working with the Code Editor
    3. Understanding Objects
      1. Understanding Objects
      2. Navigating the Excel Object Hierarchy
      3. Understanding Collections
      4. Using the Object Browser
      5. Working with Properties
      6. Using the With Statement
      7. Working with Methods
      8. Creating an Event Procedure
    4. Using Expressions, Variables, and Intrinsic Functions
      1. Understanding Expressions and Statements
      2. Declaring Variables
      3. Understanding Data Types
      4. Working with Variable Scope
      5. Using Intrinsic Functions
      6. Understanding Constants
      7. Using Intrinsic Constants
      8. Using Message Boxes
      9. Using Input Boxes
      10. Declaring and Using Object Variables
    5. Controlling Program Execution
      1. Understanding Control-of-Flow Structures
      2. Working with Boolean Expressions
      3. Using the If...End If Decision Structures
      4. Using the Select Case...End Select Structure
      5. Using the Do...Loop Structure
      6. Using the For...To...Next Structure
      7. Using the For Each...Next Structure
      8. Guidelines for use of Control-of-Flow Structures
    6. Working with Forms and Controls
      1. Understanding UserForms
      2. Using the Toolbox
      3. Working with UserForm Properties, Events, and Methods
      4. Understanding Controls
      5. Setting Control Properties in the Properties Window
      6. Working with the Label Control
      7. Working with the Text Box Control
      8. Working with the Command Button Control
      9. Working with the Combo Box Control
      10. Working with the Frame Control
      11. Working with Option Button Controls
      12. Working with Control Appearance
      13. Setting the Tab Order
      14. Populating a Control
      15. Adding Code to Controls
      16. Launching a Form in Code
    7. Working with the PivotTable Object
      1. Understanding PivotTables
      2. Creating a PivotTable Using Worksheet Data
      3. Working with the PivotTable Objects
      4. Working with the PivotFields Collection
      5. Assigning a Macro to the Quick Access Toolbar
    8. Debugging Code
      1. Understanding Errors
      2. Using Debugging Tools
      3. Setting Breakpoints
      4. Stepping through Code
      5. Using Break Mode during Run mode
      6. Determining the Value of Expressions
    9. Handling Errors
      1. Understanding Error Handling
      2. Understanding VBA's Error Trapping Options
      3. Trapping Errors with the On Error Statement
      4. Understanding the Err Object
      5. Writing an Error-Handling Routine
      6. Working with Inline Error Handling

Prerequisites

Required

Microsoft Excel Level 1

Microsoft Excel Level 2

Recommended

  • Knowledge of PivotTables would be helpful.

Target audience

  • Advanced Microsoft Excel professionals who need to automate Excel spreadsheet tasks using Visual Basic for Applications (VBA)

Advantage Caribbean Institute