Publisher: Microsoft

Version: 2002 (XP)
Length: 2 day s
Course-ID: SX121Ax

Course Overview

Students will learn to create and edit macros, and gain an understanding of VBA code.

Prerequisites

Excel 2002 Advanced or equivalent knowledge.

Benefits

Students will examine sample code, learn how to create macros from scratch, and add to previously created macros.

Target student

This course is designed for students who are familiar with Excel as a user and wish to progress to programming.


Introduction to Visual Basic for Applications
  • Running a macro
  • Recording a macro
  • Examining module design
Assigning macros
  • Specifying the location of recorded macros
  • Assigning macros to menus, buttons, and toolbars
Creating decision-making code
  • The If ... Then decision structure
  • The If ... Then ... Else decision structure
  • The Select Case decision structure
Using loop structures
  • Using a For... Next statement
  • Using a Do... Loop statement
  • Using a For Each... Next statement
User-defined functions and variables
  • Creating user-defined functions
  • Creating variables
Interactive macros
  • Creating a custom message box
  • Creating a custom input box
  • Extracting data from Excel
Macro management
  • Personal Macro Workbook
  • Assigning Subprocedures to run automatically
Debugging and testing code
  • Overview of debugging
Programming basics
  • Coding
  • Variables
  • Procedures
  • Error handling
  • Naming conventions