Microsoft Excel Visual Basic for Applications (VBA) - Course Outline
Duration
1 day Course
Course Aims
This course has been designed for those who wish to understand Visual Basic for Excel and how to use it to automate spreadsheets
Learning Outcomes
Upon completion of this course the participant will be able to:
• Understand the principles of VBA • Create and use Custom Dialog Boxes
• Understand terminology used with VBA • Work with Workbook, Worksheet and Range Objects
• Create VBA Procedures and User Defined Functions • Test and debug a macro in Excel
Training Method
Training is conducted by professional trainers, using hands on exercises and user practise to consolidate concepts.
Prerequisite
Participants must have attended an Advanced Excel course or have an extensive amount of experience using Excel.
Course Content
Introduction to Visual Basic
• The VBA Environment • The Visual Basic Editor
• Module Window • Project Explorer
• Properties Window • Recording a Macro
• Recording a Macro • Naming a Macro
• Running a Macro • Creating a button on a worksheet
• Assigning a macro to a button
The Visual Basic Editor
• Viewing and Editing Code • Switching between Excel and the VBA Editor
Objects, Properties and Methods
• Defining an Object • Properties of Objects
• Methods associated with Objects • The Object Browser
Building a Macro
• Recording a Macro for each task • Testing a Macro
• Editing a Macro • The With Statement
• Writing Procedures in VBA • Creating a VBA Procedure
• Looping and Decision Statements • Testing and Debugging a Macro
• The Debug Toolbar • Stepping through a Macro
• Displaying the Value of Expressions • Setting Break Points
Absolute and Relative Recording
• The Difference between Absolute and Relative Recording
• Switching between Relative and Absolute Recording
• Choosing the appropriate recording method for a given task
Getting User Input
• The InputBox function • The MsgBox function
• Creating a User Form • Assigning Macros to Command Buttons
Creating Custom Functions
• Functions and Procedures • Writing a Function in VBA
• Using Custom Functions in a Workbook • Using String Functions to build Character Strings