Visual Basic Foundation


Description:

This course provides an introduction to programming in Visual Basic. The course uses a workshop approach, illustrating key features with practical hands-on examples. Participants will gain experience in manipulating objects in an event-driven environment and at the end of the course will be able to develop user-friendly Windows applications.

Pre-requisites:

The course assumes that participants are familiar with Microsoft Windows. Participants should also understand basic programming concepts, either through using formal programming languages or writing macros.

 

Objectives:

Upon completion of this three-day class you should be able to:

        Learn components of a Visual Basic application

        Use ActiveX controls

        Distinguish between event-driven vs. procedural programming

        Create forms and menus

        Manipulate form and control properties

        Compile an application with the native code compiler

        Master Visual Basic for Applications (VBA) control structures

        Handle run-time errors

        Add simple ADO database support to your application

 

Content:

Introduction

Getting Started

Controls & the toolbox
Properties Window
Project Window
Project files, Form files
Running a program
Creating executable files
Object naming conventions
Visual Basic Concepts
Properties, Methods and Events
Using the code window
Associating code with events

Branches and Looping

If....Then....Else Blocks
Select Case
Do & For Loops
Exit and GoTo statements

Function & Sub Procedures

Function and Sub Procedures
General & Event Procedures
Defining procedures and functions
Passing parameters
Scope of procedures
Data declaration in procedures
Val, Str, IsNumeric, Format functions

Variables and Constants

Declaring variables
Scope and lifetime of variables
Symbolic constants
Variable arrays
Data typing

Providing Choices

Option Buttons
Check boxes
List & Combo boxes
Using Scroll bars for input

The Project

Opening Project files
Environment & project options
Creating and adding modules
The Object Browser

Error Handling
Invoking error handling routines
Scope of error handling

Debugging

Breakpoints and watches
Tracing and controlling execution
The Debug Window