Introduction to Programming with VBA

2 Day Course
Hands On

This course has been superceded by Microsoft Office - VBA Introduction.


Course Contents (25 topics)

  • Program definition and design
  • What is a program?; Layers of software in a computer; Task Breakdown - Identifying Start, Middle and End;
  • Flowcharts; Pseudo-code.
  • The VBA editing environment
  • Visual Basic Editor; Projects, Modules & Procedures; Setting the editor options; Navigating; Line breaks and comments
  • Simple Output
  • MsgBox statement
  • Variables and Data Types
  • What are variables?
  • Variable declaration and data types
  • Arrays.
  • Using built-in functions
  • Text manipulation; Date functions; Type-conversion
  • Simple user input
  • InputBox function
  • Program control, Branching and Looping
  • IF constructs; Case construct; For & Do Loops; Msgbox function for decision-making
  • Types of procedure
  • Features of Sub and Function procedures.
  • Calling one procedure from another
  • Differences in ways of calling subs and functions; Passing information between procedures.
  • Use of external facilities
  • Setting references; Simple file handling; Use of the Windows Registry.
  • Debugging tools and handling errors
  • Debug Toolbar; Break Points; Stepping through code; Immediate Window; Locals Window; Watch Window; choices for Error Handling.Program definition and design


Users of Microsoft Office products, typically Excel and Access, who wish to write their own Macros or proceed to more advanced Visual Basic Programming and who have had little or no previous exposure to programming. People who have programmed in other languages may find it more profitable to pursue self-study of the VB/VBA language elements We will be pleased to advise on suitable resources, but the O'Reilly book "VB and VBA in a Nutshell" is highly recommended. There are no technical pre-requisites for this course. Familiarity with the Windows environment and the ability to type a little will be useful! Note that users with programming experience should go straight to the Excel or Access programming course, as appropriate.

Course PDF