Course Code: introexcelvba
Duration: 14 hours
Prerequisites:
  • Good Excel user knowledge.
Overview:

This course has been created for anyone who works with Excel and wants to automate most of their tasks.

The course covers procedural programming in VBA. Students will learn which objects are available in Excel and how to use them. They will also learn how to write their own worksheet functions, debug programs and write complete applications using VBA forms.

Course Outline:

Macros

  • Recording and Modifying Macros
  • Assigning Macros to Toolbar, Buttons, Shortcut key

Visual Basic for Applications Environment

  • Visual Basic Editor and its options
  • Component Management
  • Shortcuts
  • Environment Optimization

Introduction to Procedural Programming

  • Procedures: Functions and Sub-routines
  • Data Types

Control Flow

  • If ...Then....Elseif....Else....Endif
  • Case
  • Do...Loop , While
  • For... Next
  • Exit
  • Arrays and Loops
  • Strings

Visual Basic

  • VBA and Sheet Data Exchange (Cells, Range Methods)
  • Getting and Printing Data from Users (InputBox, MsgBox)
  • Variable Declaration
  • Scope and LifeTime of Variables and Objects
  • Operators and Their Priorities
  • Modules Options
  • Creating Worksheet Functions
  • Objects, Classes, Methods and Properties
  • Locking Project for Viewing

Debugging

  • Run Time, Design Time, and Break Mode
  • Brakes and Watches
  • Local Window
  • Immediate Window
  • Call Stack

Error Handling

  • Errors Types
  • On Error GoTo
  • On Error Resume Next

Excel Model Object

  • Application Object
  • Workbook Object and Workbooks Collection
  • Worksheet Object and Worksheets Collection
  • ThisWorkbook, ActiveWorkbook, ActiveCell, ....
  • Selection Object
  • Range Collection
  • Cells Collection
  • Using Status Bar
  • Screen Updating and Optimizing
  • Timer and Time Measuring

Events Handling in VBA

VBA Forms

  • Creating and Using Forms
  • Invoking Forms in VBA Code
  • Using VBA Forms in Worksheet