You will learn how to use the VB Editor to write , run and debug code. You will create statements and utilise events to write procedures and functions. You will learn to control program execution with conditional statements and loops. You will also create user input forms and how to error trap.

Target audience

Students should have familiarity with personal computers and the use of the keyboard and mouse. They should have completed introduction, intermediate and advanced courses in Excel or have equivalent practical experience

Course contents

Getting Started

  • Introducing Visual Basic for Applications
  • Recording, running and editing a macro
  • Understanding the development environment
  • Understanding objects
  • Navigating the Excel object
  • Working with Statements, properties, events and methods

 Working with Procedures and Functions

 

  • Understanding and Creating a standard module; sub procedures and functions procedures

 

  Using Expressions, Variables and Functions

  • Understanding expressions and statements
  • Declaring variables, data types, scope of variables, Constants ,using spreadsheet functions.
  • Using message boxes
  • Using input boxes
  • Declaring and using object Variables

 Controlling Program Execution

  • Understanding control-of-flow structures
  • Working with Boolean expressions, Using if, Case; do loop, for next structures
  • Guidelines for use of control-of-flow structures

 Working with Forms and Controls

  • Using the toolbox
  • Working with User Form properties, events and methods, controls and properties
  • Understanding controls, using Label; text box; Command button; option button; combo box and
  • frame controls
  • Setting the tab order
  • Populating a control
  • Adding code to controls
  • Launching a form in code

 Debugging Code

  • Understanding errors and debugging tools
  • Setting breakpoints and stepping through code
  • determining the value of expressions

 Handling Errors

 

  • Understanding error handling and trapping